You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@trafodion.apache.org by "David Wayne Birdsall (JIRA)" <ji...@apache.org> on 2015/10/08 00:52:26 UTC

[jira] [Closed] (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 ]

David Wayne Birdsall closed TRAFODION-772.
------------------------------------------
       Resolution: Cannot Reproduce
    Fix Version/s:     (was: 2.0-incubating)
                   1.2-incubating

Evidently this problem has been fixed though there is no record of a fix. The problem cannot be reproduced any longer. In fact, "showstatistics" shows the same results after running "update statistics" as it does for an initially empty table.

> 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: 1.2-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)