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

Performance problem ? on a positionned cursor

Dear all,

To DELETE rows in a EEE context (AIX 5.1 / V7.2 FP11 or V8.1 FP5), I have
used a CLI program and a shell that runs on each partition. What I am
surprised is about the slowness of this CLI program. Basically, to delete
about 7 million rows, it's going to take 7 times a single DELETE FROM TABLE
statement.

Do you have any advise or is this a normal behaviour ?

The table is in LOCKSIZE exclusive, and not on the catalog partition. The
snashot shows each "thread" on partition as an X table LOCK and is
executing.

Thanks for your help,

Jean-Marc
Nov 12 '05 #1
7 1657

"Jean-Marc Blaise" <no****@nowhere.com> wrote in message
news:cb**********@news-reader5.wanadoo.fr...
Dear all,

To DELETE rows in a EEE context (AIX 5.1 / V7.2 FP11 or V8.1 FP5), I have
used a CLI program and a shell that runs on each partition. What I am
surprised is about the slowness of this CLI program. Basically, to delete
about 7 million rows, it's going to take 7 times a single DELETE FROM TABLE statement.

Do you have any advise or is this a normal behaviour ?

The table is in LOCKSIZE exclusive, and not on the catalog partition. The
snashot shows each "thread" on partition as an X table LOCK and is
executing.

Thanks for your help,

Jean-Marc

What kind of indexes are there on the table?
Nov 12 '05 #2
Jean-Marc,

I'm not really surprised. Your app is a bottleneck and you play
ping-pong between the the client, the coordinator and the database
partition. So you'r looking at, ~ 7M * 4 communications.
By contrast the searched delete has a total of 2 (client coordinator) +
2 * #partitions presuming a simple searched DELETE.

Cheers
Serge
--
Serge Rielau
DB2 SQL Compiler Development
IBM Toronto Lab
Nov 12 '05 #3
Hi Serge,

No, no, on each 4 partition I am doing the same stuff. A script switches to
each node, and launches in background a CLI script that opens a positionned
cursor with SELECT 1 FROM TABLE WHERE NODENUM(col) = CURRENT NODE AND
COLNAME=<VALUE>, and does the DELETE WHERE CURRENT OF CURSOR.

When I first tried from a single cli program launched without the
NODENUM(col) ... clause , I remember that I was effectively doing ping-pong
as you say between the coordinator and other partitions.

I monitored that there is no exchange between nodes, that a TABLE lock is
taken on each partition except the catalog partition that does not support
the TABLE and that each process is effectively on a different partition,
status "Executing".

I had a look to the CLI reference guide, to try delete from a positionned
cursor an array ... I have no clue why it takes 1 minute with a single
DELETE statement and about 10 minutes with my CLI programs in // (I commit
every 50000 lines).

Regards,

JM

"Serge Rielau" <sr*****@ca.eye-be-em.com> a écrit dans le message de
news:cb**********@hanover.torolab.ibm.com...
Jean-Marc,

I'm not really surprised. Your app is a bottleneck and you play
ping-pong between the the client, the coordinator and the database
partition. So you'r looking at, ~ 7M * 4 communications.
By contrast the searched delete has a total of 2 (client coordinator) +
2 * #partitions presuming a simple searched DELETE.

Cheers
Serge
--
Serge Rielau
DB2 SQL Compiler Development
IBM Toronto Lab

Nov 12 '05 #4
"Mark A" <no****@switchboard.net> a écrit dans le message de
news:x_*************@news.uswest.net...

"Jean-Marc Blaise" <no****@nowhere.com> wrote in message
news:cb**********@news-reader5.wanadoo.fr...
Dear all,

To DELETE rows in a EEE context (AIX 5.1 / V7.2 FP11 or V8.1 FP5), I have used a CLI program and a shell that runs on each partition. What I am
surprised is about the slowness of this CLI program. Basically, to delete about 7 million rows, it's going to take 7 times a single DELETE FROM

TABLE
statement.

Do you have any advise or is this a normal behaviour ?

The table is in LOCKSIZE exclusive, and not on the catalog partition. The snashot shows each "thread" on partition as an X table LOCK and is
executing.

Thanks for your help,

Jean-Marc

What kind of indexes are there on the table?

There are 3 indexes on the table.

JM
Nov 12 '05 #5
Well you're still playing ping-pong. The cursor can't be blocked because
it's for delete. So every fetch is a trip to the server and so is every
delete.

Cheers
Serge

--
Serge Rielau
DB2 SQL Compiler Development
IBM Toronto Lab
Nov 12 '05 #6
I see ! Thanks a lot for putting me back in the right track ...

JM

"Serge Rielau" <sr*****@ca.eye-be-em.com> a écrit dans le message de
news:cb**********@hanover.torolab.ibm.com...
Well you're still playing ping-pong. The cursor can't be blocked because
it's for delete. So every fetch is a trip to the server and so is every
delete.

Cheers
Serge

--
Serge Rielau
DB2 SQL Compiler Development
IBM Toronto Lab

Nov 12 '05 #7
You may also check your logging settings. (mincommit and so on...)

PM

"Jean-Marc Blaise" <no****@nowhere.com> a écrit dans le message de
news:cb**********@news-reader4.wanadoo.fr...
I see ! Thanks a lot for putting me back in the right track ...

JM

"Serge Rielau" <sr*****@ca.eye-be-em.com> a écrit dans le message de
news:cb**********@hanover.torolab.ibm.com...
Well you're still playing ping-pong. The cursor can't be blocked because
it's for delete. So every fetch is a trip to the server and so is every
delete.

Cheers
Serge

--
Serge Rielau
DB2 SQL Compiler Development
IBM Toronto Lab


Nov 12 '05 #8

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

Similar topics

8
by: Sebastian Werner | last post by:
Howdy, I currently develop the javascript toolkit qooxdoo (http://qooxdoo.sourceforge.net), some of you heard it already. We have discovered a slowdown on Internet Explorers performance when...
7
by: Michael Beumers | last post by:
Hello NG I've defined a cursor like the following in my COBOL Programm: DECLARE testc CURSOR FOR SELECT ... FROM ... WHERE field1 LIKE :hostvariable1 field2 LIKE :hostvariable2
3
by: Joachim Klassen | last post by:
Hi all, first apologies if this question looks the same as another one I recently posted - its a different thing but for the same szenario:-). We are having performance problems when...
7
by: P. Adhia | last post by:
Sorry for quoting an old post and probably I am reading out of context so my concern is unfounded. But I would appreciate if I can get someone or Serge to confirm. Also unlike the question asked in...
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...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
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,...
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...
0
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...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
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 project—planning, coding, testing,...

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.