db-derby-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Rick Hillegas (JIRA)" <j...@apache.org>
Subject [jira] Commented: (DERBY-4818) Derby is taking a long time to parse SQLs with more than 9 tables for the first time.
Date Fri, 24 Sep 2010 13:25:35 GMT

    [ https://issues.apache.org/jira/browse/DERBY-4818?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12914464#action_12914464
] 

Rick Hillegas commented on DERBY-4818:
--------------------------------------

Hi Trung,

You may be interested in reading this high level description of the Derby optimizer: http://db.apache.org/derby/papers/optimizer.html
The Derby optimizer considers left-deep join trees. That means that for a query with N tables,
the time spent optimizing the query is roughly proportional to N! . As the number of tables
grows, the number of possible plans mushrooms.

Hope this is useful,
-Rick

> Derby is taking a long time to parse SQLs with more than 9 tables for the first time.
> -------------------------------------------------------------------------------------
>
>                 Key: DERBY-4818
>                 URL: https://issues.apache.org/jira/browse/DERBY-4818
>             Project: Derby
>          Issue Type: Bug
>          Components: SQL
>    Affects Versions: 10.4.1.3
>         Environment: All OS platforms and all JVM versions on Derby 10.4.1.3
>            Reporter: Trung Tran
>
> I have SQLs with 9 or more tables and it takes a couple of minutes to compile these SQLs
for the first time.  I'm assuming that the optimizer is taking a long time to figure out the
query plan.

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


Mime
View raw message