Quantcast
Channel: SQL Server Analysis Services forum
Viewing all articles
Browse latest Browse all 14337

Alternative for Greatest function to get latest date

$
0
0

Hi All,

I have a cube, which has many partitions. 

The monthly partition query is like - 

SELECT * FROM loc_view WHERE greatest(CDATE,CDATE_P_C) between TRUNC (SYSDATE,'YEAR') and (TRUNC(SYSDATE, 'MONTH'))- INTERVAL '1' SECOND

and similarly there is daily partition query and hourly partitions query.

I observed that using GREATEST function is causing the cube to take more process time. in this partitions I should get data based on whatever is the latest date. Is there any other alternative to GREATEST? So that it may decrease process time.

Whenever a parent item is updated, the CDATE gives updated date for only  for parent item. And CDATE_P_C gives updated date for parent and its corresponding child items. So I am using both dates

Please suggest.

Thank you


sania


Viewing all articles
Browse latest Browse all 14337

Trending Articles



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