Hello
I am having some issues with tempdb.
Basically, it's growing beyond our disc drive space.
I know, there's one piece of code causing it
I appreciate records can be inserted a certain number at a time and that would keep this to a minumum although, I'm a little unsure of what to do with the following:
I have a piece of code
The code runs as a transform task within a DTS package
It's simply code and not a stored procedure
The code comprises of 8 unions
Each of these are a reasonable size (around 1m rows)
The 8 pieces of sub code are then grouped and aggregated by a piece of code that surrounds them
e.g.
Note, this is a very simple interpretation, in reality joins and tables differ but the union is possible and works
Initially, I also had grouping and summing on the 8 steps
I removed this
Are there any steps I could take to improve it
Write each to a file and then group/aggregate to another file?
Insert x rows at a time - how if I am aggregating?
Just accept it - it's as good as it gets?
Anything else?
Any advice would be very much appreciated
Damian.
I am having some issues with tempdb.
Basically, it's growing beyond our disc drive space.
I know, there's one piece of code causing it
I appreciate records can be inserted a certain number at a time and that would keep this to a minumum although, I'm a little unsure of what to do with the following:
I have a piece of code
The code runs as a transform task within a DTS package
It's simply code and not a stored procedure
The code comprises of 8 unions
Each of these are a reasonable size (around 1m rows)
The 8 pieces of sub code are then grouped and aggregated by a piece of code that surrounds them
e.g.
Code:
select x, y, z, sum(sales), sum(cost) from
(select x, y, z, sales, cost from a
union all
select x, y, z, sales, cost from b
etc.
) a
group by x, y, z
Note, this is a very simple interpretation, in reality joins and tables differ but the union is possible and works
Initially, I also had grouping and summing on the 8 steps
I removed this
Are there any steps I could take to improve it
Write each to a file and then group/aggregate to another file?
Insert x rows at a time - how if I am aggregating?
Just accept it - it's as good as it gets?
Anything else?
Any advice would be very much appreciated
Damian.