db-derby-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Chris Wilson (JIRA)" <j...@apache.org>
Subject [jira] Created: (DERBY-4971) Query runs 10 times more slowly with optimizer turned ON
Date Thu, 13 Jan 2011 17:15:46 GMT
Query runs 10 times more slowly with optimizer turned ON

                 Key: DERBY-4971
                 URL: https://issues.apache.org/jira/browse/DERBY-4971
             Project: Derby
          Issue Type: Bug
          Components: SQL
    Affects Versions:
            Reporter: Chris Wilson

Derby takes 10 times as long to execute the attached query on the attached database when the
optimizer is allowed to choose its own join order.

chris@fen-desktop2(tmp)$ cat ij 


java -cp $DERBY_JAR:$TOOLS_JAR $OPTIONS org.apache.derby.tools.ij "$@"

chris@fen-desktop2(tmp)$ time ./ij optimizer-on.sql 
ij version 10.7
ij> connect 'jdbc:derby:;databaseName=/tmp/rita.derby;user=rita';
ij> SELECT journey.transport_company AS journey_transport_provider, ...
1 row selected
ij> quit;

real	0m47.459s
user	0m47.067s
sys	0m0.344s

chris@fen-desktop2(tmp)$ time ./ij optimizer-off.sql 
real	0m3.913s
user	0m4.100s
sys	0m0.148s

This message is automatically generated by JIRA.
You can reply to this email to add a comment to the issue online.

View raw message