Subject AW: [firebird-support] Performance differenz by 20 times between gpre and IBOconsole
Author Klement Guenther - Munich-MR - external
>
> In embedded program, do you use exactly the same command,
Have a look at this:
EXEC SQL DECLARE IT40_CURSOR CURSOR FOR
SELECT NAMEKLASSE,
KATEGORIE,
NAMESPRACHE,
BEZ,
BEZ_STD,
NAMEOBJEKT,
NAMEDIFF,
NAMEFIRST,
Z_KEY,
K_KEY
FROM RT_IDENTTAB
WHERE
BEZ_STD LIKE :it40_bez_std
AND NAMEKLASSE = :it40_nameklasse
AND KATEGORIE = :it40_kategorie
AND NAMESPRACHE = :it40_namesprache
AND (NAMEDIFF IS NULL OR NAMEDIFF <> :it40_namediff)

/* Still more badly to try this */
/*PLAN (rt_identtab INDEX (xrt_ident_bez_std) )*/

/* ORDER BY BEZ_STD */
;
>
> Because you use Order By clause, you can't see all used
> indexes in plan.
> Try to run both variants without Order By and then compare plans.
>
Without the order by clause there are less disk I/Os but at some point embedded version does strange things.
I compared the offsets of the file accesses to the database file and these are the same quit before IBOconsole finishs it work (about 200 without the order by clause). But embedded version does 5000 extra disk I/Os after this point.


Guenther