-
Different Query time
I have a view with following code in it
create view test_t as
SELECT TRUNC(DY_DAY) SALE_DATE, FM_POWER_KEY,TO_POWER_KEY,HO_HOUR,MIN(NVL(FMPVH_ACT_VOLUME,0)) PURCH,
(MIN(NVL(TOPVH_ACT_VOLUME,0)) + SUM(LOSS_VOLUME)) SALES FROM sams.act_purchase_vol
HAVING MIN(NVL(FMPVH_ACT_VOLUME,0)) != (MIN(NVL(TOPVH_ACT_VOLUME,0)) + SUM(LOSS_VOLUME))
GROUP BY DY_DAY,FM_POWER_KEY,TO_POWER_KEY,HO_HOUR
if i ran query from above view
select * from test_t where day >= '01-mar-2005'
rows return within 30 sec.
if i ran with
select * from test_t where day = '01-mar-2005'
then it just runs
-
trace the query, compare the execution plans
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|