Post by Svein Erling TysværDoes your statement actually use 'bd%' or a parameter?
It uses 'bd%', so no parameters. Using the starting with will make it all
simple
as I can do that at source, so no need to programmatically alter a SQL.
RBS
On Mon, Jul 16, 2012 at 11:17 AM, Svein Erling Tysvær <
Post by Svein Erling Tysvær**
Post by Bart SmissaertIt looks simply replacing the like 'bd%' with starting with 'bd' will
make it use the index as well. Will be
Post by Bart Smissaertsimpler to do that in code than adding the between.
Does your statement actually use 'bd%' or a parameter? LIKE :MyParameter
can never use an index since it doesn't know if the parameter starts with a
constant or a wildcard. STARTING WITH on the other hand, can use an index.
I'm uncertain whether old Firebird versions can use an index for LIKE
<constant>, I would expect 1.5 to be able to use it, but it might be an
optimization that came later (I used Fb 1.5 for many years without noticing
such a problem, but I hardly ever used LIKE, and probably never when I
hoped for an index to be used on that field).
HTH,
Set
[Non-text portions of this message have been removed]
------------------------------------
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Visit http://www.firebirdsql.org and click the Resources item
on the main (top) menu. Try Knowledgebase and FAQ links !
Also search the knowledgebases at http://www.ibphoenix.com
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Yahoo! Groups Links
<*> To visit your group on the web, go to:
http://groups.yahoo.com/group/firebird-support/
<*> Your email settings:
Individual Email | Traditional
<*> To change settings online go to:
http://groups.yahoo.com/group/firebird-support/join
(Yahoo! ID required)
<*> To change settings via email:
firebird-support-***@yahoogroups.com
firebird-support-***@yahoogroups.com
<*> To unsubscribe from this group, send an email to:
firebird-support-***@yahoogroups.com
<*> Your use of Yahoo! Groups is subject to:
http://docs.yahoo.com/info/terms/