473,770 Members | 4,544 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

import from NUL converted to ordinary delete

Hi folks,

we are running DPF Version 8.2 on windows 2000 (don't blame me).

We try to truncate a table. However when I issue

import from NUL of del replace into [tbcreator.tbnam e]

and take a snapshot for that application I see the following SQL
statement:

delete from [tbcreator.tbnam e]

Is this how the "truncate" is implemented for DB2 Version 8.2 DPF on
windows????
There is no pint in doing the import from NUL that way because this
will still lead to a great deal of logging...

Thnaks
Florian

Jul 25 '07 #1
2 2918
fy****@googlema il.com wrote:
Hi folks,

we are running DPF Version 8.2 on windows 2000 (don't blame me).

We try to truncate a table. However when I issue

import from NUL of del replace into [tbcreator.tbnam e]

and take a snapshot for that application I see the following SQL
statement:

delete from [tbcreator.tbnam e]

Is this how the "truncate" is implemented for DB2 Version 8.2 DPF on
windows????
There is no pint in doing the import from NUL that way because this
will still lead to a great deal of logging...
Florian,

The proof is in the pudding. Is it faster or not. Do you see the logging
or not? I'm not familiar with the implementation of IMPORT, but it may
be that it passes special instructions to DB2 along with the DELETE.
For example a DELETE FROM SESSION.TEMPTAB LE will truncate a temp table
instead of deleting from it row by row.

Cheers
Serge

--
Serge Rielau
DB2 Solutions Development
IBM Toronto Lab
Jul 25 '07 #2
Thank you Serge.

Interesting:
I created a table with 2 Million rows and started the import replace
from NUL

A snapshot while the import was running showd the following SQL:
SELECT T.TYPE, SUM(CASE WHEN TC.ENFORCED='Y' THEN 1 ELSE 0 END) AS
CHILDREN, SUM(CASE WHEN TC.ENFORCED='Y' AND R.TABNAME=T.TAB NAME AND
R.TABSCHEMA=T.T ABSCHEMA THEN 1 ELSE 0 END) AS SELFREFS FROM
TABLE(SYSPROC.B ASE_TABLE('ADMD B2','TMABIN_ALL _DEL')) B, SYSCAT.TABLES
T LEFT OUTER JOIN SYSCAT.REFERENC ES R ON R.REFTABNAME=T. TABNAME AND
R.REFTABSCHEMA= T.TABSCHEMA LEFT OUTER JOIN SYSCAT.TABCONST TC ON
TC.TABNAME=R.TA BNAME AND TC.TABSCHEMA=R. TABSCHEMA AND
TC.CONSTNAME=R. CONSTNAME AND TC.TYPE='F' where T.TABNAME=B.BAS ENAME
AND T.TABSCHEMA=B.B ASESCHEMA GROUP BY T.TYPE

However:
UOW log space used (Bytes) = 0

the import replace took 1 second
the delete for the same amount of data took 13 seconds and showed - of
course - logging

Thank you Serge, next time I will try before asking :)

Regards,
Florian

>
The proof is in the pudding. Is it faster or not. Do you see the logging
or not? I'm not familiar with the implementation of IMPORT, but it may
be that it passes special instructions to DB2 along with the DELETE.
For example a DELETE FROM SESSION.TEMPTAB LE will truncate a temp table
instead of deleting from it row by row.

Cheers
Serge

--
Serge Rielau
DB2 Solutions Development
IBM Toronto Lab

Jul 25 '07 #3

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

Similar topics

20
4155
by: Ioannis Vranos | last post by:
When we use the standard placement new operator provided in <new>, and not a definition of owr own, isn't a call to placement delete enough? Consider the code: #include <new>
8
6557
by: Nick M | last post by:
Hello All, Excellent info here Thanks! I am very new to using access in general and I am on a learning curve. I'm trying to import an excel workbook (with worksheets) into an access db via a macro. (I'll get to using VB later on). What I would like to do is import a single workbook w/three seperate worksheets into three seperate access tables AND truncate the time stamp that is used in the excell sheet via a macro.
2
1510
by: Pete | last post by:
I am converting several small J++ applications to C# using the JLCA with Visual Studio 2005. There are lots of errors 1209 "Method was not converted to a property". I'm curious as to WHY they were not converted to a property. Some get-and-set pairs get converted, some don't, it all seems rather random. Some get-and-set pairs are not converted because because the 'set' method is overloaded. I can see a 1209 here I guess.
2
7048
by: google | last post by:
Is there anyway to programatically confirm that specific field names exist in the first row of a given Excel spreadsheet from code within Access? I have code set up to import data from our spreadsheets from HQ into our Access database for further use, using the first row as column headings to determine the destination field in the Access table. Since it's possible (and probable) that HQ could change the format of the spreadsheets without...
1
3625
by: Matt | last post by:
I am writing a DELETE statement and I want to filter the records using another SELECT statement. My SELECT statement is a GROUP BY query that grabs all social security numbers from the "Data With Import Date Current" table on a given day where there was only one transaction (count of SSN = 1). I want to delete these records from the "Data With Import Date Current" table. I would like to do this by joining the "Data With Import Date...
12
11094
by: =?Utf-8?B?am9uaWdy?= | last post by:
I wrote a simple VB.NET application that imports and edits CSV files. Now I’d like to “lock” the raw (pre-import) CSV files so these cannot be opened separately. It is not high-sensitive data, I just don’t want folks to peek in the files. So time-consuming encryption is not necessary, just a simple password-to-open that I can program in my application so it internally opens the imported CSV file would be perfect, but I can’t...
7
6943
by: ITAutobot25 | last post by:
My delete button is not working in my GUI and my due date is today before midnight. Can anyone show me how to correct this error? My assignment statement is below as well as 5 classes. InventoryGUI is the main class to begin execution. Thanks! Modify the Inventory Program to include an Add button, a Delete button, and a Modify button on the GUI. These buttons should allow the user to perform the corresponding actions on the item name, the...
0
1614
by: dudeja.rajat | last post by:
On Sat, Aug 30, 2008 at 2:32 PM, Fredrik Lundh <fredrik@pythonware.comwrote: Fredrik, Thanks so much. That worked. Following this, I can now see that my combo2 has no previous elements and contains only the elements relevant to selection in combo1. Now, as soon as I select something in combo 2 and go back to change selection in combo1 the combo2 must get its history cleared up (i.e the previous selection in combo2's entry subwidget)
1
3252
jbt007
by: jbt007 | last post by:
Hi All, I am using the following code to import a spreadsheet into my Access 2003 tblWeekly table: DoCmd.TransferSpreadsheet acImport, acSpreadsheetTypeExcel8, "tblweekly", strOutFile, True, "impData" The strOutFile contains the path and file name of the spreadsheet. The "impData" is the range that contains the data I need to import. It is a fluid range (changes from week to week). The spreadsheet is created using Access Automation...
0
9425
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10057
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
0
8883
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 projectplanning, coding, testing, and deploymentwithout human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
7415
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 presenter, Adolph Dupr who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6676
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5449
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
3970
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
3575
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2816
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.