Db2 performance issue

IBM's flagship relational database management system

Db2 performance issue

Postby tambe vaishali » Sun Oct 26, 2008 12:28 am

some SQL queries taking lot of time.Actually it's a cursor.. which contains select from joining of 2-3 tables and not existalso..
basic form in is::
select count(*) ,... from table1 a table2 b,table3 c
where a.--=b.-- and b.--=c.-- etc
and not exist
(select d, e, f from table d,table e
where ..)

Basically table also contain around 600000 rows.
Please suggest any option to tune this query to reduce time
tambe vaishali
Posts: 1
Joined: Sat Oct 25, 2008 11:43 pm
Has thanked: 0 time
Been thanked: 0 time

Re: Db2 performance issue


Re: Db2 performance issue

Postby dick scherrer » Sun Oct 26, 2008 12:39 am

Hello and welcome to the forum,

Actually it's a cursor..
I susperct the cursor is incidental - the query looks awful (if performance is a concern). . .

Please suggest any option to tune this query to reduce time
Suggest you look for a different approach and not try for the "single query" solution. You might have found a way to save yourself a bit of code, but you may have also found a way to put the machine to sleep.
Hope this helps,
User avatar
dick scherrer
Global moderator
Posts: 6308
Joined: Sat Jun 09, 2007 8:58 am
Has thanked: 3 times
Been thanked: 90 times

Return to DB2


  • Related topics
    Last post