Subject | Re: [firebird-support] Re: How can I force the use of an index in FB2.0 |
---|---|
Author | Hans |
Post date | 2006-12-01T18:12:58Z |
Yes, great, that used
PLAN (TICKETS INDEX (RDB$PRIMARY15))
PLAN (TICKETITEMS NATURAL)
But I don't understand why the original delete query
in FB2.0.0.0 did not use any indexes.
At least I can continue testing :)
Thank you
Hans
PLAN (TICKETS INDEX (RDB$PRIMARY15))
PLAN (TICKETITEMS NATURAL)
But I don't understand why the original delete query
in FB2.0.0.0 did not use any indexes.
At least I can continue testing :)
Thank you
Hans
----- Original Message -----
From: "lacakus" <lacak@...>
To: <firebird-support@yahoogroups.com>
Sent: Thursday, November 30, 2006 11:35 PM
Subject: [firebird-support] Re: How can I force the use of an index in FB2.0
>> However in FB.2.0.0.0 the same delete SQL
>>
>> DELETE FROM TICKETITEMS WHERE TICKET_UNIQUENUM
>> NOT IN (SELECT TICKET_UNIQUENUM FROM TICKETS);
>>
>> execution takes forever, since it selects
>>
>> PLAN (TICKETS NATURAL)
>> PLAN (TICKETITEMS NATURAL)
>>
> I am not sure, but try rewrite delete statement :
>
> DELETE FROM TICKETITEMS WHERE not exixts(
> select * from TICKETS where
> TICKET_UNIQUENUM=TICKETITEMS.TICKET_UNIQUENUM );
>
> -Laco.
>
>
>
> ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
>
> 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
>
>
>