Subject | Re: [firebird-support] SELECT UPPER(MY_FIELD) -> DON'T USE INDEX |
---|---|
Author | Martijn Tonies |
Post date | 2008-04-22T15:10:29Z |
Hi,
Martijn Tonies
Database Workbench - tool for InterBase, Firebird, MySQL, NexusDB, Oracle &
MS SQL Server
Upscene Productions
http://www.upscene.com
My thoughts:
http://blog.upscene.com/martijn/
Database development questions? Check the forum!
http://www.databasedevelopmentforum.com
> Hello, I'm using FB 1.5'SOMETHING'
>
> I have a table with an index on MY_CHAR_FIELD
> if I do:
>
> SELECT * FROM MY_TABLE WHERE MY_CHAR_FIELD STARTING WITH 'SOMETHING'
>
> FB perform index reads, bu if I do
>
> SELECT * FROM MY_TABLE WHERE Upper(MY_CHAR_FIELD) STARTING WITH
>In Firebird 2.0 you can, but not in 1.5.
> FB don't use any index, which seems logical.
> Can I create an index based on Upper(MY_CHAR_FIELD) ?
> How is the correct way to do it ?
Martijn Tonies
Database Workbench - tool for InterBase, Firebird, MySQL, NexusDB, Oracle &
MS SQL Server
Upscene Productions
http://www.upscene.com
My thoughts:
http://blog.upscene.com/martijn/
Database development questions? Check the forum!
http://www.databasedevelopmentforum.com