Subject Re: [firebird-support] Speed difference between = and LIKE
Author Martijn Tonies
> OK, so I suppose the main thing here is that using LIKE doesn't prevent an
> index being used.
>
> Maybe I didn't explain clear enough.
>
> Given the situation that in field1 all records starting with abcd are
> abcde
> is there then any advantage to do
>
> field1 = 'abcde' compared to doing field1 starting with 'abcd' ?

Well, one advantage might be that you can never know for future data
if STARTING WITH 'abcd' returns only 'abcde' data ;-)


They are different statements, use the one that is appropriate.

With regards,

Martijn Tonies
Upscene Productions
http://www.upscene.com

Download Database Workbench for Oracle, MS SQL Server, Sybase SQL
Anywhere, MySQL, InterBase, NexusDB and Firebird!

Database questions? Check the forum:
http://www.databasedevelopmentforum.com