You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@trafodion.apache.org by "Suresh Subbiah (JIRA)" <ji...@apache.org> on 2015/10/05 18:11:26 UTC
[jira] [Updated] (TRAFODION-772) LP Bug: 1393930 - Update Stats
fails on empty table using internal sort
[ https://issues.apache.org/jira/browse/TRAFODION-772?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Suresh Subbiah updated TRAFODION-772:
-------------------------------------
Assignee: David Wayne Birdsall (was: Barry Fritchman)
> LP Bug: 1393930 - Update Stats fails on empty table using internal sort
> -----------------------------------------------------------------------
>
> Key: TRAFODION-772
> URL: https://issues.apache.org/jira/browse/TRAFODION-772
> Project: Apache Trafodion
> Issue Type: Bug
> Components: sql-cmp
> Reporter: Barry Fritchman
> Assignee: David Wayne Birdsall
> Priority: Minor
> Fix For: 2.0-incubating
>
>
> When an Update Statistics statement is executed on a table that is empty but previously contained one or more rows, if internal sort is used the statement fails with the following error:
> *** ERROR[9207] The specified SAMPLE option generated an empty sample set. Modify the SAMPLE option and resubmit.
> The intended behavior is for the statement to succeed without generating any histograms. The error is particularly confusing because the ustat statement may not have even included the SAMPLE option.
> To reproduce this error, first create a simple table and populate it with at least one row:
> cqd MODE_SEABASE 'ON';
> create table tbl
> (
> a int not null primary key,
> b int,
> c int,
> d int
> );
> insert into tbl values (1,2,3,4);
> From this point, execute either of the following sequences to produce the error.
> Option 1:
> update statistics for table tbl on every column;
> delete from tbl;
> update statistics for table tbl on every column;
> Option 2:
> delete from tbl;
> cqd USTAT_USE_IS_WHEN_NO_STATS 'on';
> update statistics for table tbl on every column;
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)