Subject RE: [firebird-support] Re: Upgrade to FB2.01 and performance drops
Author Mercea Paul
Try

SELECT *
FROM "Inventory" i
WHERE NOT EXISTS (SELECT 1 FROM "InventoryGroupsTL" where
i.id="InventoryID")



Regards,

Paul



From: firebird-support@yahoogroups.com
[mailto:firebird-support@yahoogroups.com] On Behalf Of rymarkham
Sent: Friday, May 18, 2007 9:37 AM
To: firebird-support@yahoogroups.com
Subject: [firebird-support] Re: Upgrade to FB2.01 and performance drops



I've having the same hassle, using FB 1.5 takes < 0.08 seconds on FB
2.0 13+ minutes.

SELECT *
FROM "Inventory" i
WHERE i.id NOT IN (SELECT "InventoryID" FROM "InventoryGroupsTL")

Inventory has 50 000 records, InventoryGroupsTL has 49000. How would
an EXIST sort this out?

When I try force the plan I get an error
"Token unknown - line 5, column 1.
PLAN."

SELECT *
FROM "Inventory" I
WHERE I.id NOT IN (SELECT "InventoryID" FROM "InventoryGroupsTL")
PLAN ("InventoryGroupsTL" INDEX ("PK_InventoryGroupsTL"))
PLAN (I NATURAL)

Thanks
Roy





[Non-text portions of this message have been removed]