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)
 Query timeout with SP4 installed

Author  Topic 

lancepr
Starting Member

17 Posts

Posted - 2005-09-07 : 17:36:34
I have this simple query that is testing 16 records. Works fine on a test server with SP3 installed, but when I move it over to the live server with SP4 installed the query will forever! Both servers are running windows 2000 with SP4 and SQL server 2000.

SELECT * FROM tbl_confirmation_file
WHERE EMAIL_ADD_TEXT LIKE '%@%' AND LANG_CD = 'EN_US'
AND EMAIL_ADD_TEXT NOT IN (SELECT EMAIL_ADD_TEXT FROM tbl_Email_Confirm)

Should I try and roll back to SP3 on the live server?
Should I be doing this a new way when SP4 is installed?

Thanks,
Lance

nr
SQLTeam MVY

12543 Posts

Posted - 2005-09-07 : 17:44:09
Have a look at the query plans on the two systems

A number of things to try
SELECT t.*
FROM tbl_confirmation_file t
left join tbl_Email_Confirm t2
on t2.EMAIL_ADD_TEXT = t.EMAIL_ADD_TEXT
WHERE charindex('@',t.EMAIL_ADD_TEXT) <> 0
AND t.LANG_CD = 'EN_US'
where t2.EMAIL_ADD_TEXT is null


==========================================
Cursors are useful if you don't know sql.
DTS can be used in a similar way.
Beer is not cold and it isn't fizzy.
Go to Top of Page
   

- Advertisement -