Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2000 Forums
 SQL Server Development (2000)
 Reduce the execution time of the query Urgent plz.

Author  Topic 

sutr_kam
Starting Member

5 Posts

Posted - 2011-05-13 : 11:13:57
Hi all this is my query now. But it taking very long time to get results.
Can anybody optimize it. It is very urgent please help soon..
so that execution time is less





SELECT DISTINCT
case.column1, case.column2
FROM case
WHERE
case.installationID = 34 AND
case.mainid = 34 AND
case.Status = 'Open' And
case.caseID in
(select caseID from owner where ownerid in (1120,1121,1122)) AND
detail like (
case when
(select type from cele where
celeid=3129)='DRP' then 'heman' when
(select type from cele where celeid=3129)!='DRP' then '%heman%' end)
and w.caseid = case.caseid
and w.ctabid = c.ctabid
and c.status = 1
and w.ceid=3129)>0
Order By case.openDate



regards,
sutr kam

webfred
Master Smack Fu Yak Hacker

8781 Posts

Posted - 2011-05-13 : 11:25:17
is that another one?
http://www.sqlteam.com/forums/topic.asp?TOPIC_ID=160594


No, you're never too old to Yak'n'Roll if you're too young to die.
Go to Top of Page

GilaMonster
Master Smack Fu Yak Hacker

4507 Posts

Posted - 2011-05-13 : 11:31:24
Nope. Exactly the same query, posted 10 minutes later.

Sutr, we're all volunteers, posting in our space time. If you need a reply within 10 minutes, hire a consultant.

--
Gail Shaw
SQL Server MVP
Go to Top of Page
   

- Advertisement -