db-derby-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Kathey Marsden (JIRA)" <derby-...@db.apache.org>
Subject [jira] Updated: (DERBY-822) Client driver: Pre-fetch data on executeQuery()
Date Thu, 29 Jun 2006 15:54:30 GMT
     [ http://issues.apache.org/jira/browse/DERBY-822?page=all ]

Kathey Marsden updated DERBY-822:

    Derby Info: [Existing Application Impact, Release Note Needed]  (was: [Patch Available])


Pre-fetching  with Network Client/Server  is a performance optimization that eliminates a
round trip to the server.  Essentially the first ResultSet next()  call is executed on the
Statement executeQuery() or execute().   Applications are typically  prepared to handle this
but the following issue may be seen,


Queries may fail earlier and locks may be aquired earlier when executing queries.   Location
where errors occur  embedded environment is different.


Errors that happen as part of the normal execution path are moved earlier.   For example,
 code to execute a query, with executeQuery() retrieve the result set metadata and then perform
a next() might fail with a lock timeout on executeQuery() instead of next().  Locking changes
are observed.


Pre-fetching moves execution of retrieval of data earlier for network client/server configurations.


This was an intentional behavior change to improve performance.  No Derby product solution
is offered.


Application code needs to be changed to adjust error handling if needed.

> Client driver: Pre-fetch data on executeQuery()
> -----------------------------------------------
>          Key: DERBY-822
>          URL: http://issues.apache.org/jira/browse/DERBY-822
>      Project: Derby
>         Type: Improvement

>   Components: Network Server, Performance
>     Versions:
>     Reporter: Knut Anders Hatlen
>     Assignee: Knut Anders Hatlen
>     Priority: Minor
>      Fix For:
>  Attachments: DERBY-822-v1.diff, DERBY-822-v1.stat, DERBY-822-v2.diff, DERBY-822-v2.stat,
DERBY-822-v3.diff, DERBY-822-v3.stat
> Currently, the client driver does not pre-fetch data when
> executeQuery() is called, but it does on the first call to
> ResultSet.next(). Pre-fetching data on executeQuery() would reduce
> network traffic and improve performance.
> The DRDA protocol supports this. From the description of OPNQRY (open
> query):
>   The qryrowset parameter specifies whether a rowset of rows is to be
>   returned with the command.  This is only honored for non-dynamic
>   scrollable cursors (QRYATTSNS not equal to QRYSNSDYN) and for
>   non-scrollable cursors conforming to the limited block query
>   protocol.  The target server fetches no more than the requested
>   number of rows. It may fetch fewer rows if it is restricted by extra
>   query block limits, or if a fetch operation results in a negative
>   SQLSTATE or an SQLSTATE of 02000.

This message is automatically generated by JIRA.
If you think it was sent incorrectly contact one of the administrators:
For more information on JIRA, see:

View raw message