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

Mamta A. Satoor updated DERBY-269:
----------------------------------

    Attachment: DERBY269_update_statistics_svnstat_ver2.txt
                DERBY269_update_statistics_svndiff_ver2.txt

I have final patch DERBY269_update_statistics_svndiff_ver2.txt attached to this 
jira. The output of svn stat -q is as follows. The patch is not very different 
from the first patch. The changes in this patch are that 
1)I have added a new test lang\UpdateStatisticsTest.java which does basic 
testing like 
  a)attempt to update statistics of a table that does not exist 
  b)attempt to update statistics of a non-existent index on a pre-existing 
table 
  c)create table, create index, load data in table, make sure there is no 
statistics created for index because there was no data in the table when it was 
created, create another index, it should get statistics created because there 
is data in the table, now perform update statistics on first index and it 
should also get statistics created for it 
  d)issue internally generated ALTER TABLE ... sql for system procedure 
directly but that will fail because such a sql can only be generated internally 
and is  not available to the users 
  e)try to issue update statistics on global temporary table and that should 
fail
2)I have added a new test in existing GrantRevokeDDLTest.java to show that the 
new system procedure has public access available on it. The only requirement is 
the table on which it is being issued should be accessible to the user issuing 
it.
3)In my first patch, I had forgotten to add the keyword STATISTICS into 
non-reserved non-sql92 list and because of that, db2Compatibility test was 
failing incorrectly and I had provided a fix for the test. But marking the 
keyword correctly in sqlgrammar.jj makes sure that no changes are required in 
db2Compatibility test.
4)In addition, I have reformatted the following files to use correct space/tab 
format when compared to the first patch.
5)I have removed UpdateStatisticsConstantAction,java since the code inside it 
has now been moved to AlterTableConstantAction.
6)I fixed the incorrect version number that I had in upgradeTests/_Suite.java 

Will appreciate any comments on the patch. If no comments, then work on 
committing it in a day or two. Thanks

svn stat -q
M      java\engine\org\apache\derby\impl\sql\compile\AlterTableNode.java
M      java\engine\org\apache\derby\impl\sql\compile\sqlgrammar.jj
D      
java\engine\org\apache\derby\impl\sql\execute\UpdateStatisticsConstantAction.java
M      
java\engine\org\apache\derby\impl\sql\execute\GenericConstantActionFactory.java
M      
java\engine\org\apache\derby\impl\sql\execute\AlterTableConstantAction.java
M      java\engine\org\apache\derby\impl\sql\catalog\DataDictionaryImpl.java
M      java\engine\org\apache\derby\impl\sql\catalog\DD_Version.java
M      java\engine\org\apache\derby\iapi\sql\dictionary\IndexRowGenerator.java
M      java\engine\org\apache\derby\iapi\sql\dictionary\DataDictionary.java
M      java\engine\org\apache\derby\catalog\SystemProcedures.java
M      
java\testing\org\apache\derbyTesting\functionTests\tests\lang\RolesTest.java
A      
java\testing\org\apache\derbyTesting\functionTests\tests\lang\UpdateStatisticsTest.java
M      java\testing\org\apache\derbyTesting\functionTests\tests\lang\_Suite.java
M      
java\testing\org\apache\derbyTesting\functionTests\tests\lang\GrantRevokeDDLTest.java
M      
java\testing\org\apache\derbyTesting\functionTests\tests\upgradeTests\_Suite.java
M      
java\testing\org\apache\derbyTesting\functionTests\tests\upgradeTests\Changes10_2.java
M      
java\testing\org\apache\derbyTesting\functionTests\tests\upgradeTests\UpgradeRun.java
A      
java\testing\org\apache\derbyTesting\functionTests\tests\upgradeTests\Changes10_5.java

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

Reply via email to