Query tuning
Hi,
The below query is taking hrs to run while there are not much records. I have rebuild indexes ,analyze the schema .
SELECT * FROM usage_events WHERE TDATE BETWEEN '2013-02-24T00:00:00' AND '2013-02-24T23:59:59'
and purchaseId not in (select purchaseId from purchase_events)
How can we rewrite this query for better performance.
Regards,
Naresh
The below query is taking hrs to run while there are not much records. I have rebuild indexes ,analyze the schema .
SELECT * FROM usage_events WHERE TDATE BETWEEN '2013-02-24T00:00:00' AND '2013-02-24T23:59:59'
and purchaseId not in (select purchaseId from purchase_events)
How can we rewrite this query for better performance.
Regards,
Naresh
0