473,386 Members | 1,708 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,386 software developers and data experts.

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('000D60984D9A586AAD001128','2006-09-23-02.25.00',0,103923200,1843939328,298211000,6931647 000,1834013105000,128034627001536546,6779,252559,0 ,33,54219,12803462700153654)
-------------------------------------------
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 6352
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('000D60984D9A586AAD001128','2006-09-23-02.25.00',0,103923200,1843939328,298211000,6931647 000,1834013105000,128034627001536546,6779,252559,0 ,33,54219,12803462700153654)
-------------------------------------------
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_IOST
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
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...
6
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...
2
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. ...
18
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...
4
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
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...
20
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...
8
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...
8
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...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
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:
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...
0
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,...
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...

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.