Avatar of Jim Youmans
Jim Youmans
Flag for United States of America asked on

DB2 Explain Plan takes forever

DB2 10.5 on Windows Server 2012

I can have a query that takes 3 seconds to run and then when I look at the explain plan, it takes 2-5 minutes to generate.  And it seems to be getting slower.  

How can I speed this up?  In my QA environment the same operation takes like 20 seconds to generate.

Jim
Windows OSWindows Server 2012Quality AssuranceDB2

Avatar of undefined
Last Comment
Kent Olsen

8/22/2022 - Mon
Kent Olsen

That seems pretty weird, Jim.  It sounds like a resource conflict (perhaps a lock?) is getting in the way.  An explain plan should generate quite quickly.



Jim Youmans

ASKER
On my QA and Stage servers it does, but on the busy prod server can take up to 5 minutes.  I thought maybe some of the tables that explain uses needed to be cleared or something.
ASKER CERTIFIED SOLUTION
Kent Olsen

THIS SOLUTION ONLY AVAILABLE TO MEMBERS.
View this solution by signing up for a free trial.
Members can start a 7-Day free trial and enjoy unlimited access to the platform.
See Pricing Options
Start Free Trial
GET A PERSONALIZED SOLUTION
Ask your own question & get feedback from real experts
Find out why thousands trust the EE community with their toughest problems.
Your help has saved me hundreds of hours of internet surfing.
fblack61