credit table and validtransaction table have million record data from year 2008 onwards.
We are doing a migration. So I need to find out the credittypeids which are no
The following index on the CREDIT
table should help:
CREATE INDEX idx ON CREDIT (PERIODSEQ, CREDITTYPEID);
This should allow the EXISTS
clause lookup to evaluate more quickly. You could also try the following variant index, which reverses the order of the columns:
CREATE INDEX idx ON CREDIT (CREDITTYPEID, PERIODSEQ);