472,958 Members | 2,006 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

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

Using a lot of Tempspace

This sql statement dies after using more than 40GB Tempspace:

INSERT INTO dcp.cmp_mo_p_bab_kart ( currency, year,
figure, period, month_date, company, center, account,
value )
WHEN src.currency IS null
THEN dest.currency
ELSE src.currency END AS currency ,
WHEN src.year IS null
THEN dest.year
ELSE src.year END AS year ,
WHEN src.figure IS null
THEN dest.figure
ELSE src.figure END AS figure ,
WHEN src.period IS null
THEN dest.period
ELSE src.period END AS period ,
WHEN src.month_date IS null
THEN dest.month_date
ELSE src.month_date END AS month_date ,
WHEN src.company IS null
THEN dest.company
ELSE src.company END AS company ,
WHEN src.center IS null
THEN dest.center
ELSE src.center END AS center ,
WHEN src.account IS null
THEN dest.account
ELSE src.account END AS account , COALESCE(src.value,0)
AS value
FROM dcp.t_mo_p_bab_kart src FULL OUTER JOIN (
SELECT DISTINCT d.currency AS currency , d.year AS
year , d.figure AS figure , d.period AS period ,
d.month_date AS month_date , d.company AS company
, d.center AS center , d.account AS account , d.value
AS value
FROM dcp.mo_p_bab_kart d , dcp.t_mo_p_bab_kart s
WHERE d.company = s.company and d.year = s.year and
d.period = s.period and d.month_date = s.month_date
and d.figure = s.figure and d.currency = s.currency
) dest ON src.company = dest.company AND src.center
= dest.center AND src.year = dest.year AND src.period
= dest.period AND src.month_date = dest.month_date
AND src.figure = dest.figure AND src.currency =
dest.currency AND src.account = dest.account

Table dcp.mo_p_bab_kart has 2129489 cards , dcp.t_mo_p_bab_kart 189424
Runstats ok.

Perhaps is it better to use UNION ALL or work with temporary table?


Mit freundlichen Gruessen / Best regards
Joachim Mueller
Nov 12 '05 #1
2 1812
Just a guess: Would it be semantically OK to place the DISTINCT in the
You should take a look at the plan and check for sorts and temps.

Nov 12 '05 #2

thank you for the hint.

"Serge Rielau" <sr*****@ca.eyebeem.com> schrieb im Newsbeitrag
Just a guess: Would it be semantically OK to place the DISTINCT in the
You should take a look at the plan and check for sorts and temps.


Nov 12 '05 #3

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

Similar topics

by: Mehul Patel | last post by:
Our .Net team have been pondering about using keyword. We are using streams FileStream and BufferedStream. We use using keyword at FileStream, and not BufferedStream which wraps FileStream. So...
by: rawCoder | last post by:
Hi All, I have a *.cer file, a public key of some one and I want to encrypt some thing using this public key. Can someone point me to a sample code for Encrypting some file using...
by: Enos Meroka | last post by:
Hallo, I am a student doing my project in the university.. I have been trying to compile the program using HP -UX aCC compiler, however I keep on getting the following errors. ...
by: acb | last post by:
Hi, I wrote a DLL Component (using Visual Studio 2005) and managed to include it into a C# Console application. I am now trying to include this component into a Web project. I copy the DLL...
by: apple | last post by:
How large should tempspace be relative to the largest table in a database to do reorgs? Does tempspace have to be at least twice the size of the table being reorged. Assuming nothing is using...
by: Eugene Anthony | last post by:
The problem with my coding is that despite removing the records stored in the array list, the rptPages repeater control is still visible. The rptPages repeater control displayes the navigation...
by: JDeats | last post by:
I have some .NET 1.1 code that utilizes this technique for encrypting and decrypting a file. http://support.microsoft.com/kb/307010 In .NET 2.0 this approach is not fully supported (a .NET 2.0...
by: alexhguerra | last post by:
Hello Is it possible that a reorg index doesnt use a sys temporary tablespace and use the index tablespace in a reorg index? (db2 udb v8 fixpack 12 - there are 2 8k system tablespaces on this...
by: =?Utf-8?B?Q2hyaXMgSGFsY3Jvdw==?= | last post by:
Hi there I've successfully added some .NET validation controls to a page (using <asp:RequiredFieldValidator ...), however when I try to set the 'display' property to 'dynamic', my page then...
by: lllomh | last post by:
Define the method first this.state = { buttonBackgroundColor: 'green', isBlinking: false, // A new status is added to identify whether the button is blinking or not } autoStart=()=>{
by: DJRhino | last post by:
Was curious if anyone else was having this same issue or not.... I was just Up/Down graded to windows 11 and now my access combo boxes are not acting right. With win 10 I could start typing...
by: Aliciasmith | last post by:
In an age dominated by smartphones, having a mobile app for your business is no longer an option; it's a necessity. Whether you're a startup or an established enterprise, finding the right mobile app...
by: tracyyun | last post by:
Hello everyone, I have a question and would like some advice on network connectivity. I have one computer connected to my router via WiFi, but I have two other computers that I want to be able to...
by: giovanniandrean | last post by:
The energy model is structured as follows and uses excel sheets to give input data: 1-Utility.py contains all the functions needed to calculate the variables and other minor things (mentions...
by: NeoPa | last post by:
Hello everyone. I find myself stuck trying to find the VBA way to get Access to create a PDF of the currently-selected (and open) object (Form or Report). I know it can be done by selecting :...
by: NeoPa | last post by:
Introduction For this article I'll be using a very simple database which has Form (clsForm) & Report (clsReport) classes that simply handle making the calling Form invisible until the Form, or all...
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 1 Nov 2023 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM) Please note that the UK and Europe revert to winter time on...
by: nia12 | last post by:
Hi there, I am very new to Access so apologies if any of this is obvious/not clear. I am creating a data collection tool for health care employees to complete. It consists of a number of...

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.