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