Hi,
Can somebody put some light on this:
I have two queries which look the same , the first one is taking hours to return a result in the Production system having loads of data
1. SELECT COUNT (DISTINCT PRODUCT_ID) FROM "_SYS_BIC".CV_ABC"
And the second query is getting me the same result within fraction of seconds.(1 second or so)
2. SELECT COUNT(*) FROM (SELECT DISTINCT PRODUCT__ID FROM "_SYS_BIC"."CV_ABC")
Though they look the same performance wise, what is the thing in the first query which is taking so long to execute?
Kindly help me understanding this...
With Regards,
Mohammad Irfan.