Details
-
Bug
-
Status: Closed
-
Minor
-
Resolution: Cannot Reproduce
-
None
-
None
Description
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;