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 |
|
Siddhesh
Starting Member
2 Posts |
Posted - 2008-05-07 : 03:21:02
|
| Hi,I have encountered a query which takes lots of temp tablespace and it fails later.Initially the temp tablespace was 28GB, we made it to 56 GB but still it fails.There is just this single process that is running on database.I tried putting index on the table in query ,but no help.Can suggest a solution to get size of temp space required or reduce its usage? |
|
|
RickD
Slow But Sure Yak Herding Master
3608 Posts |
Posted - 2008-05-07 : 03:27:43
|
| Post the query and i'm sure we can help, other than that, all I can suggest is don't use #temp tables. |
 |
|
|
Siddhesh
Starting Member
2 Posts |
Posted - 2008-05-07 : 04:46:52
|
| Actually i won't be able to post the code......could you suggest a way to optimize the temporary space for complex queries. Or maybe tell how to determine the temporary space a code would take. |
 |
|
|
RickD
Slow But Sure Yak Herding Master
3608 Posts |
Posted - 2008-05-07 : 06:08:21
|
| Use the database tuning wizard. Without code, I am not going to make any other suggestions. |
 |
|
|
rmiao
Master Smack Fu Yak Hacker
7266 Posts |
Posted - 2008-05-07 : 16:06:54
|
| Make complex queries in smaller batches. |
 |
|
|
|
|
|