You are viewing a plain text version of this content. The canonical link for it is here.
Posted to derby-dev@db.apache.org by "Knut Anders Hatlen (JIRA)" <ji...@apache.org> on 2009/06/24 18:03:08 UTC
[jira] Commented: (DERBY-4289) Docs could be clearer on what
SYSCS_UTIL.SYSCS_INPLACE_COMPRESS_TABLE does with statistics
[ https://issues.apache.org/jira/browse/DERBY-4289?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12723608#action_12723608 ]
Knut Anders Hatlen commented on DERBY-4289:
-------------------------------------------
It does not look like SYSCS_INPLACE_COMPRESS_TABLE updates the statistics. See the IJ session below.
ij version 10.6
ij> connect 'jdbc:derby:testdb;create=true';
ij> create table t (x int);
0 rows inserted/updated/deleted
ij> insert into t values 1,2,3;
3 rows inserted/updated/deleted
ij> insert into t values 1,2,3;
3 rows inserted/updated/deleted
ij> create index ti on t(x);
0 rows inserted/updated/deleted
ij> select creationtimestamp, cast(statistics as varchar(30)) from sys.sysstatistics;
CREATIONTIMESTAMP |2
---------------------------------------------------------
2009-06-24 17:59:57.308 |numunique= 3 numrows= 6
1 row selected
ij> insert into t values 1,2,3;
3 rows inserted/updated/deleted
ij> call syscs_util.syscs_inplace_compress_table('APP','T',1,1,1);
0 rows inserted/updated/deleted
ij> select creationtimestamp, cast(statistics as varchar(30)) from sys.sysstatistics;
CREATIONTIMESTAMP |2
---------------------------------------------------------
2009-06-24 17:59:57.308 |numunique= 3 numrows= 6
1 row selected
ij> call syscs_util.syscs_compress_table('APP','T',1);
0 rows inserted/updated/deleted
ij> select creationtimestamp, cast(statistics as varchar(30)) from sys.sysstatistics;
CREATIONTIMESTAMP |2
---------------------------------------------------------
2009-06-24 18:00:47.839 |numunique= 3 numrows= 9
1 row selected
ij>
> Docs could be clearer on what SYSCS_UTIL.SYSCS_INPLACE_COMPRESS_TABLE does with statistics
> ------------------------------------------------------------------------------------------
>
> Key: DERBY-4289
> URL: https://issues.apache.org/jira/browse/DERBY-4289
> Project: Derby
> Issue Type: Improvement
> Components: Documentation
> Affects Versions: 10.5.1.1
> Environment: Solaris
> Reporter: Alan Burlison
> Priority: Minor
>
> The documentation for SYSCS_UTIL.SYSCS_INPLACE_COMPRESS_TABLE says:
> "Use the SYSCS_UTIL.SYSCS_INPLACE_COMPRESS_TABLE system procedure to reclaim unused, allocated space in a table and its indexes."
> The documentation for SYSCS_UTIL.SYSCS_COMPRESS_TABLE says in addition:
> "The SYSCS_UTIL.SYSCS_COMPRESS_TABLE system procedure updates statistics on all indexes as part of the index rebuilding process."
> I'm assuming SYSCS_UTIL.SYSCS_INPLACE_COMPRESS_TABLE also rebuilds the statistics, but the documentation doesn't day either way.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.