db-derby-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Knut Anders Hatlen (Updated) (JIRA)" <j...@apache.org>
Subject [jira] [Updated] (DERBY-5437) Load all toursdb tables in one invocation of ij
Date Fri, 30 Sep 2011 11:29:45 GMT

     [ https://issues.apache.org/jira/browse/DERBY-5437?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel

Knut Anders Hatlen updated DERBY-5437:

    Attachment: d5437-2.diff

Attaching version 2 of the patch, which makes ij run with java/demo/toursdb as working directory
(so that it finds the scripts invoked indirectly by loadTables.sql), and sets derby.system.home
to make sure the database and derby.log ends up in the generated/toursdb directory.

The patch also changes the toursdb.insertMaps class so that its main() method shuts down the
database cleanly before exiting. This removes the need for a new invocation of ij just to
perform recovery and shut down the database after on, so the disconnect.sql script could be
removed from the source tree.

The patch reduces the number of ij invocations from 9 to 1. Now that toursdb is actually built,
it takes a little longer than with the previous patch, but I still see a 25 second speedup
of "ant all" compared to a clean trunk.
> Load all toursdb tables in one invocation of ij
> -----------------------------------------------
>                 Key: DERBY-5437
>                 URL: https://issues.apache.org/jira/browse/DERBY-5437
>             Project: Derby
>          Issue Type: Improvement
>          Components: Demos/Scripts
>    Affects Versions:
>            Reporter: Knut Anders Hatlen
>            Assignee: Knut Anders Hatlen
>            Priority: Minor
>         Attachments: d5437-2.diff, d5437.diff
> The toursdb example database is built as part of "ant all". Currently, java/demo/toursdb/build.xml
invokes ij nine times, as well as a custom Java program (toursdb.insertMaps) once, to create
the database, and all of these run in separate Java processes. This means the database engine
is cold booted 10 times, which can take considerable time.
> There is already a script called loadTables.sql, which calls loadCOUNTRIES.sql, loadCITIES.sql,
I propose that we use that script instead of invoking each of the sub-scripts separately.
This would reduce the number of times the database engine would have to be booted from 10
to 4 per full build.

This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira


View raw message