Quantcast
Channel: SCN: Message List
Viewing all articles
Browse latest Browse all 9080

Re: Low performance of count(distinct) in SAP HANA

$
0
0

Justin,

Thank you for you reply.

Now we have SAP HANA 70 revision.

SELECT COUNT(CARDNUMBER),SHOPNAME

FROM (

  SELECT COUNT(*) AS "Quantity"

  ,O.CARDNUMBER

  ,O.SHOPNAME

  FROM OLAPFACTS O

  INNER JOIN OLAP_DATE OD ON O.DATEEXT = OD.DATEID

  WHERE OD.DATEVALUE BETWEEN '2013-07-15'

  AND ADD_DAYS('2013-07-15', 29)

  AND O.CARDTYPE = 1

  GROUP BY O.CARDNUMBER, O.SHOPNAME

  )

GROUP BY SHOPNAME

order by shopname

 

 

This query work 40 seconds and give the same results as a query in my first post. But what is the cause of poor performance COUNT(DISTINCT) combination?

version.png


Viewing all articles
Browse latest Browse all 9080

Trending Articles



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