I have a where clause on a view like this.
where period_key between 20111207 and 20130101 and vendor_key=300 and retailer_key=6 and item_key in (2891934) ORDER BY STORE_KEY, PERIOD_KEYThe view is a result of join between a fact and dimension table on store_key.The fact projection that is currently in use by this query is
ORDER BY STORE_KEY, PERIOD_KEYCan anybody suggest, what should be the best design for the query predicate stated above, The only thing that changes in the query everytime it is executes is the item number.
SEGMENTED BY hash(STORE_KEY,PERIOD_KEY) ALL NODES
It executes many time ( more then 5000 in span of 3 hrs ).
I am seeing different execution time for each instance of this query which I want to minimize.
Also, Can we create manual projections with derived columns. Currently I am getting error on this.