Have you ran it thru Visual Explain?



date: Fri, 24 Jan 2025 12:59:26 +0100
from: Marco Facchinetti <marco.facchinetti@xxxxxxxxx>
subject: Help about Sql Delete performance

Hi we are performing this Sql over a table without triggers, LF and
journals:

DELETE FROM TSEDAT4/MULTTT400F WHERE LGIDL1 <> ' ' AND LGIDL1 NOT IN(Select
L1ID FROM TSEDAT4/MULTTT100F)

The statement runs but I see in Wrkactjob opt. 14 that I/O and RRN almost
the same numbers as if each record generate a single I/O. Since it's an Sql
statement and not RPG files access I was expecting blocked I/O operations
and thus better performances.

Get Diagnostic resturns:

COMMAND_FUNCTION_CODE=+43
COMMAND_FUNCTION=EXECUTE IMMEDIATE
CONDITION_NUMBER=+1
DB2_MESSAGE_ID=SQL7955
DB2_ORDINAL_TOKEN_1=MULTTT400F
DB2_ORDINAL_TOKEN_2=TSEDAT4
DB2_ORDINAL_TOKEN_3=38952036
DB2_ORDINAL_TOKEN_4=0
DB2_SQL_ATTR_CONCURRENCY=L
DB2_SQL_ATTR_CURSOR_CAPABILITY=D
DB2_SQL_ATTR_CURSOR_HOLD=N
DB2_SQL_ATTR_CURSOR_ROWSET=N
DB2_SQL_ATTR_CURSOR_SCROLLABLE=N
DB2_SQL_ATTR_CURSOR_SENSITIVITY=S
DB2_SQL_ATTR_CURSOR_TYPE=F
DB2_SQLERRD_SET=Y
DB2_SQLERRD3=+38952036
DB2_SQLERRD6=-134613515
DB2_TOKEN_COUNT=+4
DB2_TOKEN_STRING=MULTTT400F TSEDAT4 38952036 0
DYNAMIC_FUNCTION_CODE=+19
DYNAMIC_FUNCTION=DELETE WHERE
MESSAGE_TEXT=38952036 righe rilevate da MULTTT400F in TSEDAT4.
MORE=N
NUMBER=+1
RETURNED_SQLSTATE=00000
ROW_COUNT=+38952036

Any hint?

TIA
--
Marco Facchinetti

Mr S.r.l.

Tel. 035 962885
Cel. 393 9620498

Skype: facchinettimarco




As an Amazon Associate we earn from qualifying purchases.

This thread ...

Follow-Ups:

Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

This mailing list archive is Copyright 1997-2025 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].

Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.