Evaluate Weigh the pros and cons of technologies, products and projects you are considering.

Possible to improve SQL query speed?

SQL query is faster at second run because files are already loaded into memory and thus there is no I/O.

How can I reinstate the first run condition for a query without IPLing my system? I'm at V5R2. I did try the CLRPOOL command and SETOBJACC, but didn't have any luck.

Any query interface on the iSeries (SQL, Query/400, OPNQRYF, etc) would have the same behavior of running faster on the second time if objects stay resident in memory.

Not sure why you don't think that SETOBJACC isn't working to clear objects, but that would be the preferred method over the CLRPOOL command. With SETOBJACC, you also need to remember to clear out any indexes or keyed logical files used by the query optimizer in the implementation of your query.

Dig Deeper on DB2 UDB (universal databases)

Have a question for an expert?

Please add a title for your question

Get answers from a TechTarget expert on whatever's puzzling you.

You will be able to add details on the next page.

Start the conversation

Send me notifications when other members comment.

Please create a username to comment.