Subject | Re: [firebird-support] SQL - performance |
---|---|
Author | Martijn Tonies |
Post date | 2004-08-20T19:57:48Z |
Hi,
If you have an index of NIVEL, the first one is the
fastest.
The second one cannot use an index.
With regards,
Martijn Tonies
Database Workbench - developer tool for InterBase, Firebird, MySQL & MS SQL
Server.
Upscene Productions
http://www.upscene.com
> I'm using FIREBIRD 1.5 and I have a question.'01.01'
> What SQL has the best performance ?
>
> 1) select * from planoconta where nivel like '01.01%'
>
> or
>
> 2) select * from planoconta where substring(nivel from 1 for 5) =
If you have an index of NIVEL, the first one is the
fastest.
The second one cannot use an index.
With regards,
Martijn Tonies
Database Workbench - developer tool for InterBase, Firebird, MySQL & MS SQL
Server.
Upscene Productions
http://www.upscene.com