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.
Author |
Topic |
napilut
Starting Member
2 Posts |
Posted - 2011-08-05 : 05:58:02
|
I'm from Spain and my English is too poor. Forgive me.We are actually working with SQL server 2005 db.There is a query, that uses some temporally tables (5), that was working fast and correctly some months ago until now (from few seconds to more than a minute). The query has not been edited.The first thinq we've thought was that the server disc space was running out, however the server disc space is correct.What else can it be? Do you have any sugestion?Thanks.Jordi. |
|
SwePeso
Patron Saint of Lost Yaks
30421 Posts |
Posted - 2011-08-05 : 06:14:14
|
Have you updated the statistics?What have happened to the granularity of index columns? N 56°04'39.26"E 12°55'05.63" |
|
|
napilut
Starting Member
2 Posts |
Posted - 2011-08-05 : 08:38:02
|
The statistics have been updated, but it does not solves the problem.This problem is very strange. The problem is bout the temporary table but I don't understand why. It was working fine and fast during some months until now. There is a part of the query code where the temporary table is filled with three selects:insert into #tempTableselect ...insert into #tempTableselect ...insert into #tempTableselect ...This code takes about a minute. If I comment out the insert statement:--insert into #tempTableselect ...--insert into #tempTableselect ...--insert into #tempTableselect ...The three selects take less than a second.(The #tempTable is not used inside the select statement)Why?Thank you! |
|
|
SwePeso
Patron Saint of Lost Yaks
30421 Posts |
Posted - 2011-08-05 : 10:28:40
|
Are your physical files fragmented? N 56°04'39.26"E 12°55'05.63" |
|
|
AndrewMurphy
Master Smack Fu Yak Hacker
2916 Posts |
Posted - 2011-08-05 : 10:49:56
|
Does the Temp database needs CHECKDB run on same??? Corruption? |
|
|
|
|
|