Subject | Re: [firebird-support] Performance differenz by 20 times between gpre and IBOconsole |
---|---|
Author | Ivan Prenosil |
Post date | 2004-05-19T12:21:42Z |
> EXEC SQL DECLARE IT40_CURSOR CURSOR FOR...
> SELECT NAMEKLASSE, ...
> WHERE
> BEZ_STD LIKE :it40_bez_std
That is what I thought, your commands are not the same.
If you try in IBOconsole this command
select nameklasse,
kategorie,
namesprache,
bez,
bez_std,
nameobjekt,
namediff,
namefirst,
z_key,
k_key
from rt_identtab
where nameklasse = 'BERUF'
and kategorie = 'BezeichnungWbEKlasse'
and namesprache = 'deutsch'
and bez_std like 'LEHR%%' || ''
and (namediff is null OR namediff <> 'XXX')
order by bez_std;
you should get equally bad performance as with gpre version.
(because now LIKE operator also will not be able to use index).
If you need wildcards only at the end of pattern in LIKE,
use STARTING clause instead.
Ivan