473,625 Members | 3,239 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Insert statement taking a long time to complete.

Hello,

DB2 V8 LUW FP 11.

My applications eventually takes a very long time to process simple
insert statements.
Here´s the output of a event monitor:

Text : INSERT INTO MyTable
VALUES('000D609 84D9A586AAD0011 28','2006-09-23-02.25.00',0,103 923200,18439393 28,298211000,69 31647000,183401 3105000,1280346 27001536546,677 9,252559,0,33,5 4219,1280346270 0153654)
-------------------------------------------
Start Time: 09/25/2006 13:53:51.471750
Stop Time: 09/25/2006 13:54:21.137034
Exec Time: 29.665284 seconds
Number of Agents created: 1
User CPU: 0.000000 seconds
System CPU: 0.000000 seconds
Fetch Count: 0
Sorts: 0
Total sort time: 0
Sort overflows: 0
Rows read: 0
Rows written: 1
Internal rows deleted: 0
Internal rows updated: 0
Internal rows inserted: 0
Bufferpool data logical reads: 0
Bufferpool data physical reads: 0
Bufferpool temporary data logical reads: 0
Bufferpool temporary data physical reads: 0
Bufferpool index logical reads: 0
Bufferpool index physical reads: 0
Bufferpool temporary index logical reads: 0
Bufferpool temporary index physical reads: 0
SQLCA:
sqlcode: 0
sqlstate: 00000

There are no clustered index and/or triggers defined. However, there
are several others applications reading/writing into the same table.
Locking doesn´t seem to be an issue, as all applications that read
data from the table use the UR isolation.

How do I figure out why the statement took so long to complete? Besides
event monitoring, any traces available? Any other clues ?

Thanks in Advance, Michel

Sep 25 '06 #1
4 6369
Is there any Constraint check take a long time?
Take an explain first to see if it is only an insert..
Michel Esber wrote:
Hello,

DB2 V8 LUW FP 11.

My applications eventually takes a very long time to process simple
insert statements.
Here´s the output of a event monitor:

Text : INSERT INTO MyTable
VALUES('000D609 84D9A586AAD0011 28','2006-09-23-02.25.00',0,103 923200,18439393 28,298211000,69 31647000,183401 3105000,1280346 27001536546,677 9,252559,0,33,5 4219,1280346270 0153654)
-------------------------------------------
Start Time: 09/25/2006 13:53:51.471750
Stop Time: 09/25/2006 13:54:21.137034
Exec Time: 29.665284 seconds
Number of Agents created: 1
User CPU: 0.000000 seconds
System CPU: 0.000000 seconds
Fetch Count: 0
Sorts: 0
Total sort time: 0
Sort overflows: 0
Rows read: 0
Rows written: 1
Internal rows deleted: 0
Internal rows updated: 0
Internal rows inserted: 0
Bufferpool data logical reads: 0
Bufferpool data physical reads: 0
Bufferpool temporary data logical reads: 0
Bufferpool temporary data physical reads: 0
Bufferpool index logical reads: 0
Bufferpool index physical reads: 0
Bufferpool temporary index logical reads: 0
Bufferpool temporary index physical reads: 0
SQLCA:
sqlcode: 0
sqlstate: 00000

There are no clustered index and/or triggers defined. However, there
are several others applications reading/writing into the same table.
Locking doesn´t seem to be an issue, as all applications that read
data from the table use the UR isolation.

How do I figure out why the statement took so long to complete? Besides
event monitoring, any traces available? Any other clues ?

Thanks in Advance, Michel
Sep 25 '06 #2
Is there any Constraint check take a long time?
Take an explain first to see if it is only an insert..
Thanks for the reply.

There are no constraints defined. The insert times do vary a lot, from
less than a second to 30+s. This is what puzzles me.

Here is the acess plan:

Total Cost: 6.40367
Query Degree: 1

Rows
RETURN
( 1)
Cost
I/O
|
1
INSERT
( 2)
6.40367
1
/-----+----\
1 1.22838e+06
TBSCAN TABLE: RTM
( 3) TBL_COLLECT_IOS T
3.35364e-05
0
|
1
TABFNC: SYSIBM
GENROW

Thanks, Michel

Sep 25 '06 #3
This doesn't look like an optimizer problem.
Somewhere your inserts are stuck.
Do you use any sort off conection pooling?
Connection concentrator or connection pooling?
Are you going strait to DB2 or through a middle tier?

Have you tried db2pd?

Cheers
Serge
--
Serge Rielau
DB2 Solutions Development
IBM Toronto Lab

IOD Conference
http://www.ibm.com/software/data/ond...ness/conf2006/
Sep 25 '06 #4
Serge, thanks for the reply.

I have two basic applications: one that only inserts data into the DB,
and another that reads/deletes data from the same tables.

When I am only inserting data into the DB, my statements usually
complete very quickly and I do not see any problems (such as statements
taking 30s to insert 1 row).
When both applications are Up, my insert times increase in average and
I frequently see simple insert statements taking a very long time to
complete.

The application that reads/write data has been coded to work with UR
and deletes data in chunks.

We have recently (finally!) migrated to DB2 v8, and our OLTP
environments databases are experiencing this symptom. I did not face
the same problem with db2 V7.

Besides Infocenter, any good manual/training/reading to master db2pd ?

Thanks, Michel

This doesn't look like an optimizer problem.
Somewhere your inserts are stuck.
Do you use any sort off conection pooling?
Connection concentrator or connection pooling?
Are you going strait to DB2 or through a middle tier?

Have you tried db2pd?

Cheers
Serge
--
Serge Rielau
DB2 Solutions Development
IBM Toronto Lab

IOD Conference
http://www.ibm.com/software/data/ond...ness/conf2006/
Sep 26 '06 #5

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

Similar topics

2
5631
by: newbie_mw | last post by:
Hi, I need urgent help with a novice problem. I would appreciate any advice, suggestions... Thanks a lot in advance! Here it is: I created a sign-up sheet (reg.html) where people fill in their first name, last name, email, etc. The data are then sent to a PHP script (reg.php). The data are then inserted into a table (reg) in MS SQL server. I have declared the variables like this: if (!(isset($_POST))) { $FirstName = "" ;
6
2232
by: a-ok | last post by:
Hi, My client has a product database od around 20000 items. And it is updated every few days when he gets a catalog from the supplier. It's supposed to work like this: if there already is a product in the database with that ID (primary key), just UPDATE the price, and if there is no product with that ID it should do an INSERT for that item. Now I've tried it in several ways and I can't seem to get it to execute
2
13390
by: george | last post by:
This is like the bug from hell. It is kind of hard to explain, so please bear with me. Background Info: SQL Server 7.0, on an NT box, Active Server pages with Javascript, using ADO objects. I'm inserting simple records into a table. But one insert command is placing 2 or 3 records into the table. The 'extra' records, have the same data as the previous insert incident, (except for the timestamp).
18
10265
by: Robin Lawrie | last post by:
Hi again, another problem! I've moved from an Access database to SQL server and am now having trouble inserting dates and times into seperate fields. I'm using ASP and the code below to get the date and time, but my script is erroring. '-- Get login date and time cmdLoginDate = Date() cmdLoginTime = Time()
4
3146
by: sjoshi | last post by:
Hello I have these tables: CREATE TABLE . ( NOT NULL , NOT NULL ) ON CREATE UNIQUE CLUSTERED INDEX ON .(, ) WITH FILLFACTOR = 90 ON
3
22068
by: Andrew Clark | last post by:
*** post for FREE via your newsreader at post.newsfeed.com *** it's been a while since i have poseted to this newsgroup, but for a long time i was not programming at all. but now that i am out of college and facing the prospect of getting a real job, i need to get back into the game. anyway, i don't know if some of you know the stanford CS library. i took the problem set a while back and have recently rediscovered it adn have been trying...
20
6086
by: John Bailo | last post by:
I have a c# program that loops through a table on a DB2 database. On each iteration it assigns data to values in the SqlParameter collection. The command text is an INSERT statement to a Sql Server database, run with an .ExecuteQuery I enclosed the loop in a SqlTransaction and commit it at the end. I timed the program and it inserts about 70 records a second...which I think is sort of slow...so I set up some Debug.WriteLines to...
8
3507
by: nano2k | last post by:
Hi Shortly, I keep invoices in a table. Occasionally, someone will fire the execution of a stored procedure (SP) that performs several UPDATEs against (potentially) all invoices OLDER than a date that is supplied to the SP as a parameter. The SP is usually a lengthy process (it takes at least 30 mins). The problem is that SQL server 2000 Dev Edition doesn't allow me to insert new invoices that are "younger", while the SP is executing....
8
6475
by: SaltyBoat | last post by:
Needing to import and parse data from a large PDF file into an Access 2002 table: I start by converted the PDF file to a html file. Then I read this html text file, line by line, into a table using a code loop and an INSERT INTO query. About 800,000 records of raw text. Later, I can then loop through and parse these 800,000 strings into usable data using more code. The problem I have is that the conversion of the text file, using a...
0
8259
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
8696
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
8637
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...
1
8358
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 Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
1
6119
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
5571
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
4195
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
2621
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
1504
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.