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

IQ 16 join a fact table with results from a stored procedure

$
0
0

For syntax wide, there is no issue here; but it is taking forever to execute.

 

The proc entitlement b returns few records; which just has 3 columns such as ( fiscal_year, month, gtran_id).

 

select sum(c.price), c.id

from facts c join entitlement ( 2015, 12, 12345) b

on c.fiscal_year = b.fiscal_year

and c.month = b.month

and c.id = b.gtran_id

and c.fiscal_year = 2015

 

The fact table C has billion rows; it has all the correct HG indexes.

 

Is there an issue with this kind of join?

 

Rey


Viewing all articles
Browse latest Browse all 2878

Trending Articles



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