473,398 Members | 2,120 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,398 software developers and data experts.

Temp DB growing to max available disk space

I've written a SP which does some complex calculations and in the end
dumps data into 2 tables (master & detail) When I run this sp for
smaller no of IDS (employees i.e for 13000 in Master and 60000 records
in detail table) it takes around 3-4 hrs and if I run for all
employees in the database (i.e. abt 60000 records in master and 180000
records in detail table) then it takes around 10hrs to complete.

I'm using temp table to hold data and then do the calculations, but
sometimes when I run the SP temp db starts growing and reaches up to
25 GB and the process fails as there is no space left on the disk, and
lately I'm not able to run the SP for every employee, I had to end the
process after 16 hrs

If anybody can guide me what could be posible resons or where I should
look for solution.

My row size in master table is arounnd 2000 bytes and in detail table
abt 300 bytes.

Thanks in advance.

Subodh
Jul 20 '05 #1
3 1996
Hi

To shrink tempdb

http://support.microsoft.com/default...;en-us;Q307487

As far as why you are having problems is unclear because you have not posted
the code, reducing the number of temporary tables would help, but how this
can be obtained would require the source code.
The best solution may even be to take this out of the database. You should
also make sure that you do not store unnecessary information in your
temporary tables.

John

"Subodh" <sg****@agline.on.ca> wrote in message
news:90**************************@posting.google.c om...
I've written a SP which does some complex calculations and in the end
dumps data into 2 tables (master & detail) When I run this sp for
smaller no of IDS (employees i.e for 13000 in Master and 60000 records
in detail table) it takes around 3-4 hrs and if I run for all
employees in the database (i.e. abt 60000 records in master and 180000
records in detail table) then it takes around 10hrs to complete.

I'm using temp table to hold data and then do the calculations, but
sometimes when I run the SP temp db starts growing and reaches up to
25 GB and the process fails as there is no space left on the disk, and
lately I'm not able to run the SP for every employee, I had to end the
process after 16 hrs

If anybody can guide me what could be posible resons or where I should
look for solution.

My row size in master table is arounnd 2000 bytes and in detail table
abt 300 bytes.

Thanks in advance.

Subodh

Jul 20 '05 #2
Thanks for the reply John, the code itself is 900 lines and has
complex business logic behind it. That is the reason I did not post
the code. I'm droping the temp tables within the code as soon as their
job is finished. I've abt 25 non-indexed views on those tables, do u
think those can make the performance of my SP slow. And the thing is
the temp db does not grow to 25GB every time I execute my SP, it only
happenes sometimes.
And when whenever the SP is executed in 10-12 hrs, temp db remains
under 1GB.

Can you explain more on "best solution may even be to take this out
of the database".

Thanks,

Subodh

"John Bell" <jb************@hotmail.com> wrote in message news:<41***********************@news.easynet.co.uk >...
Hi

To shrink tempdb

http://support.microsoft.com/default...;en-us;Q307487

As far as why you are having problems is unclear because you have not posted
the code, reducing the number of temporary tables would help, but how this
can be obtained would require the source code.
The best solution may even be to take this out of the database. You should
also make sure that you do not store unnecessary information in your
temporary tables.

John

"Subodh" <sg****@agline.on.ca> wrote in message
news:90**************************@posting.google.c om...
I've written a SP which does some complex calculations and in the end
dumps data into 2 tables (master & detail) When I run this sp for
smaller no of IDS (employees i.e for 13000 in Master and 60000 records
in detail table) it takes around 3-4 hrs and if I run for all
employees in the database (i.e. abt 60000 records in master and 180000
records in detail table) then it takes around 10hrs to complete.

I'm using temp table to hold data and then do the calculations, but
sometimes when I run the SP temp db starts growing and reaches up to
25 GB and the process fails as there is no space left on the disk, and
lately I'm not able to run the SP for every employee, I had to end the
process after 16 hrs

If anybody can guide me what could be posible resons or where I should
look for solution.

My row size in master table is arounnd 2000 bytes and in detail table
abt 300 bytes.

Thanks in advance.

Subodh

Jul 20 '05 #3
Hi

Taking the process outside the database refers to either putting your
business logic into a middle tier or using a separate process. This
may reduce the need to create these temporary tables as you could
"scroll" through a result set and perform the necessary calculations
in code.

You may also want to see if using derived tables will remove the need
for the temporary tables.

You can get contention on the tempdb system tables if you have
multiple processes creating temporary tables at the same time. You may
want to run profiler and monitor blocking whilst this process is
running.

John

sg****@agline.on.ca (Subodh) wrote in message news:<90**************************@posting.google. com>...
Thanks for the reply John, the code itself is 900 lines and has
complex business logic behind it. That is the reason I did not post
the code. I'm droping the temp tables within the code as soon as their
job is finished. I've abt 25 non-indexed views on those tables, do u
think those can make the performance of my SP slow. And the thing is
the temp db does not grow to 25GB every time I execute my SP, it only
happenes sometimes.
And when whenever the SP is executed in 10-12 hrs, temp db remains
under 1GB.

Can you explain more on "best solution may even be to take this out
of the database".

Thanks,

Subodh

"John Bell" <jb************@hotmail.com> wrote in message news:<41***********************@news.easynet.co.uk >...
Hi

To shrink tempdb

http://support.microsoft.com/default...;en-us;Q307487

As far as why you are having problems is unclear because you have not posted
the code, reducing the number of temporary tables would help, but how this
can be obtained would require the source code.
The best solution may even be to take this out of the database. You should
also make sure that you do not store unnecessary information in your
temporary tables.

John

"Subodh" <sg****@agline.on.ca> wrote in message
news:90**************************@posting.google.c om...
I've written a SP which does some complex calculations and in the end
dumps data into 2 tables (master & detail) When I run this sp for
smaller no of IDS (employees i.e for 13000 in Master and 60000 records
in detail table) it takes around 3-4 hrs and if I run for all
employees in the database (i.e. abt 60000 records in master and 180000
records in detail table) then it takes around 10hrs to complete.

I'm using temp table to hold data and then do the calculations, but
sometimes when I run the SP temp db starts growing and reaches up to
25 GB and the process fails as there is no space left on the disk, and
lately I'm not able to run the SP for every employee, I had to end the
process after 16 hrs

If anybody can guide me what could be posible resons or where I should
look for solution.

My row size in master table is arounnd 2000 bytes and in detail table
abt 300 bytes.

Thanks in advance.

Subodh

Jul 20 '05 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: Bob | last post by:
Hello all, I'm attempting to use JpGraph (http://www.aditus.nu/jpgraph/index.php) with PHP (4.3.1) and Apache (1.3.26) runnning on WindowsXP. However, I receive the following notice: Notice:...
3
by: shumaker | last post by:
When I import data I first import it from a text file into a table of it's own, then using some logic insert some of the records into a permanent table. I am considering having the table that...
3
by: Lamont | last post by:
VB.NET Can anyone tell me how I can get the Drive Space information from a remote computer on the same domain and physical network? Primarily I need the Total disk space and space used or free...
3
by: Esger Abbink | last post by:
Hello, it is very possible that this is a well described problem, but I have not been able to find the solution. On two production server (7.2rc2) of ours the data directory is growing to...
1
by: airmax | last post by:
Hello DBA’s I have a problem with my TEMP tablespace. It’s 1 GB and its full. Shouldn’t be empty? When the tablespace is full i have to restart the database in order clean up the tablespace, but...
4
by: yashgt | last post by:
Hi, We have created a SQL server 2000 database. We observe that the transaction log keeps growing over time. We are now about to run out of space. We have been periodically shrinking the...
0
by: elias.farah | last post by:
Hello Everyone, I've been searching for a few hours on how to check the available disk space (on a Flash disk actually) from within MS-Access. Basically, I want to ensure there is adequate...
3
by: bgold12 | last post by:
I'm curious about how websites deal with the problem of continuously growing data. For example, there are many forums that preserve all posts for many years back, and are continuously receiving and...
3
by: MC | last post by:
I'm developing an application that needs a large (up to 4 GB) amount of temporary file space on a local (not network-attached) disk. What are some good tactics to use in a C# program to make sure...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.