Quantcast
Channel: SCN : Unanswered Discussions - SAP HANA and In-Memory Computing
Viewing all articles
Browse latest Browse all 4343

Performance difference in queries

$
0
0

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.










Viewing all articles
Browse latest Browse all 4343

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>