Hello folks,
my "problem" is solved - using the tip from Mahdu.
Thanks to all for this great support - far away from .NET Provider issues :-)
Thanks Niels
------------------------------------------------ If i chance my slow version of the procedure from
(A) CREATE PROCEDURE KI_SUCHEPERSONEN_HELP2( SUCHNAME1 VARCHAR(200) CHARACTER SET WIN1252, BEREICH VARCHAR(10) CHARACTER SET WIN1252 ) AS BEGIN insert into HilfeListe(ID,Bereich) select IDPerson, :Bereich from personen where SuchName like :SuchName1; END
to this
(B) CREATE PROCEDURE KI_SUCHEPERSONEN_HELP2( SUCHNAME1 VARCHAR(200) CHARACTER SET WIN1252, BEREICH VARCHAR(10) CHARACTER SET WIN1252 ) AS BEGIN insert into HilfeListe(ID,Bereich) select IDPerson, :Bereich from personen where SuchName starting with :SuchName1; END
it runs a like bit faster as me first quick version :-)
The systax of version (B) explains firebird that i need to compare like 'ABC%'. In version (A) the optimizer can't use the index
while generating the plan, because the variable Suchtext1 could contain values like '%ABC%' or 'A[BC]%' and so on.
The on the fly version was optimized to run against the index when i fill Suchname1 with strings like 'ABC%'. I believe that >Suchname like 'ABC%'< was converted to >Suchname starting with 'ABC'<
|
Lesen Sie Ihre E-Mails jetzt einfach von unterwegs mit
Yahoo! Go.
-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
Firebird-net-provider mailing list
Firebird-net-provider@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/firebird-net-provider