Thread: SELECT on view runs slower with more WHERE conditions

SELECT on view runs slower with more WHERE conditions

From
aditya desai
Date:
Hi,
I have a view on which we are running query with below conditions.

select *  from view_alerts
where
datetypeid=2 and
timeperiodid=2 and
alertreasonid= 2 and
(percendate < -25 or percentage > 25 )

Whenever I run query with only one WHERE condition it runs within 1 min. If I keep more than one WHERE condition in above query it hangs. Also just select * from view_alerts runs in just 1 min. Unfortunately I am unable to put explain plan.

Any suggestions here?

Regards,
Aditya.