Subject | Re[4]: [ib-support] Strange query problem |
---|---|
Author | Daniel Rail |
Post date | 2003-02-12T18:12:04Z |
Hi,
Also, out of curiosity, what would happen if what you have in WHERE
clause would be integrated in the FROM clause as another JOIN, and
drop the WHERE clause.
Daniel Rail
Senior System Engineer
ACCRA Group Inc. (www.accra.ca)
ACCRA Med Software Inc. (www.accramed.ca)
> But, here it is another one:What is the PLAN that is being generated?
> "select
> pty.party_id, bill.due_date, bill.service_tax
> from
> tbl_party pty join tbl_bill bill on (bill.account_id = pty.account_id) and bill.service_id = 1
> where
> not exists (select * from tbl_invalid inv where inv.party_id = pty.party_id)"
> All of the fields you see here except "bill.due_date" and
> "bill.service_tax" are indexed fields.
> This query without the WHERE clause executes fast (1400 ms). When
> I put the WHERE clause it goes to something like 15 minutes :((
Also, out of curiosity, what would happen if what you have in WHERE
clause would be integrated in the FROM clause as another JOIN, and
drop the WHERE clause.
Daniel Rail
Senior System Engineer
ACCRA Group Inc. (www.accra.ca)
ACCRA Med Software Inc. (www.accramed.ca)