Hi,
i have a performance problem with the following query:
SELECT IMMAND,IPROD,IDESC IIM WHERE IMMAND = 188 ORDER BY IMMAND,
IPROD
I user DB2 V 8.1
The table IIM contains about 200000 records (193000 record with IMMAND
= 188).
Primary key is IMMAND, IPROD.
When im running the query it will take about 45 seconds to get the
first 50 records. I tried the following query
SELECT IMMAND,IPROD,IDESC IIM WHERE IMMAND = 188 AND IPROD > '' ORDER
BY IMMAND, IPROD
This time the query used only 0,5 seconds to give me the first 50
records.
My Question is,
what is the problem with the first query.
Any hints are great.
Juergen Ibach
Blair Adamache - 28 May 2004 11:54 GMT
Do you have up to date statistics on the table and its indexes? Is there
an index on IPROD? Can you have a unique index on IMMAND?
> Hi,
>
[quoted text clipped - 22 lines]
>
> Juergen Ibach
PM \(pm3iinc-nospam\) CGO - 28 May 2004 23:47 GMT
Is IPROD > '' a good filter factor?
Check your access plan, sort parameters and take a few snapshots to get more
info.
PM
> Hi,
>
[quoted text clipped - 22 lines]
>
> Juergen Ibach