Re: JDBC and Stored procedure performance problems
- From: Birgitta.Hauser@xxxxxxxxxxx
- Date: 4 Jan 2006 05:52:47 -0800
Hi Mark,
this is the normal behaviour of SQL. First time an SQL-statement is
executed, the query optimizer validates the access plan and searches
through all indexes (access path) for the used tables to determine the
optimal access path. After the SQL statement is executed.
The second execution may be faster, but the access plan and the access
paths are checked again, to confirm the decision of the choosen access
path or to determine an other one.
After the second execution the data path stays open (Open Data Path),
if it's reusable and gets reused by all subsequent executions.
I had no problem to explain our clients that the first execution will
take a little longer (30 seconds are not as much! Half an hour would be
an other problem).
Further the wait time may depend on the query engine that is used. I
assume that your SQL statements are executed with the CQE (Classic
Query Engine). With SQE (SQL query engine) the access plans for any SQL
statements are stored in system wide plan cache. For identical SQL
statements in different jobs the access plans in the plan cache are
found and used to create the open data paths.
Yet an other point that may slow down your performance. Never specify a
DDS described logical file in a SQL statement. The query optimizer will
not be forced to use its access path. All SQL-statements where DDS
described logical files are specified are rerouted to the CQE. This
rerouting may cost 10 - 15 % performance.
Birgitta
.
- Follow-Ups:
- Re: JDBC and Stored procedure performance problems
- From: Mark
- Re: JDBC and Stored procedure performance problems
- From: Kent Millligan
- Re: JDBC and Stored procedure performance problems
- References:
- Prev by Date: Re: AS400 sessions dropping
- Next by Date: Re: List of apps and Utilities
- Previous by thread: JDBC and Stored procedure performance problems
- Next by thread: Re: JDBC and Stored procedure performance problems
- Index(es):
Relevant Pages
|