db-derby-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Knut Anders Hatlen (JIRA)" <j...@apache.org>
Subject [jira] Commented: (DERBY-269) Provide some way to update index cardinality statistics (e.g. reimplement update statistics)
Date Thu, 17 Jul 2008 17:29:31 GMT

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

Knut Anders Hatlen commented on DERBY-269:
------------------------------------------

I think the changes look good. A couple of comments (none of them are
important enough to hold a commit):

 - You may want to make the fields that were added to AlterTableNode
   private. And the comment describing those fields will probably be
   clearer if it is split so that it explains each variable in a
   separate comment (javadoc, preferably) instead of all in the same
   comment.

 - The patch adds some trailing blanks which it would be good to clean
   out.

 - In AlterTableConstantAction.updateStatistics() I think it would be
   good to move the assignment of heapCC up before the
   try/finally. Then we don't need to check heapCC!=null in the
   finally clause. The same goes for the assignment of gsc in the same
   method.

 - I think IndexRowGenerator.getNullIndexRow() will be easier to
   understand if the variable i is declared in the for loop to reduce
   it's scope, and the first statement after the for loop is changed
   from using (i+1) to (baseColumnPositions.length+1).

 - In SystemProcedures.SYSCS_UPDATE_STATISTICS(), the two if
   statements could be merged into a single one (the body of the first
   one could be moved into the else branch of the second one).

 - The SQL in the javadoc comment of SYSCS_UPDATE_STATISTICS() lacks
   the update keyword.

 - Just wondering, but would it be better to move the optional ALL
   keyword in the syntax, so that the syntax became "UPDATE ALL
   STATISTICS" instead of "ALL UPDATE STATISTICS"? That feels like a
   more natural order to me. Not that important as long as it's just
   internal SQL, though.

 - UpdateStatisticsTest has the wrong class name in the header.

 - UpdateStatisticsTest (five instances): try/catch should call fail()
   at the end of the try block to ensure that an exception was
   thrown. Could use helper method
   BaseJDBCTestCase.assertStatementError() for this.

> Provide some way to update index cardinality statistics (e.g. reimplement update statistics)
> --------------------------------------------------------------------------------------------
>
>                 Key: DERBY-269
>                 URL: https://issues.apache.org/jira/browse/DERBY-269
>             Project: Derby
>          Issue Type: New Feature
>          Components: SQL
>    Affects Versions: 10.0.2.0, 10.0.2.1, 10.1.1.0, 10.2.2.0, 10.3.1.4
>            Reporter: Stan Bradbury
>            Assignee: Mamta A. Satoor
>         Attachments: DERBY269_update_statistics_svndiff_ver1.txt, DERBY269_update_statistics_svndiff_ver2.txt,
DERBY269_update_statistics_svnstat_ver1.txt, DERBY269_update_statistics_svnstat_ver2.txt
>
>
> Performance problems are being reported that can be resolved by updating the cardinality
statistics used by the optimizer.  Currently the only time the statistics are guaranteed to
be an up-to-date is when the index is first created on a fully populated table.  This is most
easily accomplished on an existing table by using the command: 
>    alter table <table-name> compress [sequential]  
> Compress table is an I/O intensive task.  A better way to achieve this would be to re-enable
parser support for the 'update statistics' command or re-implement the update in some other
fashion.

-- 
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