db-derby-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Knut Anders Hatlen (JIRA)" <derby-...@db.apache.org>
Subject [jira] Updated: (DERBY-822) Client driver: Pre-fetch data on executeQuery()
Date Wed, 05 Apr 2006 14:00:12 GMT
     [ http://issues.apache.org/jira/browse/DERBY-822?page=all ]

Knut Anders Hatlen updated DERBY-822:

    Attachment: DERBY-822-v2.diff

Uploading a new patch (DERBY-822-v2.diff) with most of the canon diffs
removed. For the network server code, the patch is identical to the v1
patch. See the description of that patch for details. The client (both
Derby and JCC) handles the new behaviour without code changes.

The test changes made by this patch are:

lang/supersimple.sql: Some queries which are expected to fail, don't
print column names in DerbyNet and DerbyNetClient (because the failure
is exposed earlier and the result set metadata isn't sent). Removed
column names from the canons.

lang/forupdate.sql: Some queries which failed with "Cursor not
updatable" now fail with "Cursor not found". This is actually caused
by this patch in combination with the patch for DERBY-821. The
forward-only, read-only cursor is closed on the server because all
rows are read, and there's no way to move backwards. The error message
could probably have been more accurate, but it's not incorrect, and I
believe most users will use ResultSet.deleteRow(), not "delete from t
where current of ...". (ResultSet.{delete,insert,update}Row does say
the concurrency of the result set is read-only.) Updated canons with
the changed error messages.

derbynet/testProtocol.java: In the file 'values1.inc', which is used
frequently by the protocol test, the OPNQRYRM is expected to be
followed by a QRYDSC only. With this patch, it is followed by a QRYDSC
and a QRYDTA. Added this to the file, and also changed the test so
that it checked that the codepoints were correct (the original test
just did skipDss a number of times).

> 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, Network Client, 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
> 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