Unable to showstats for table in private schema
Bug #1401334 reported by
Paul Low
This bug affects 1 person
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Trafodion |
Fix Released
|
Medium
|
Roberta Marton |
Bug Description
User creates private schema and table. Showstats on the table returns an error about header not being long enough.
SQL>connect USERNAME1/PASSWORD1
Connected to Trafodion
SQL>create schema schema902;
--- SQL operation complete.
SQL>set schema schema902;
--- SQL operation complete.
SQL>create table tab8(a int not null primary key,b int)no partition;
--- SQL operation complete.
SQL>showstats for table tab8 on every column;
*** ERROR[1] The message id: problem_
*** ERROR[1] The message id: header_
*** ERROR[1] The message id: problem_
*** ERROR[1] The message id: header_
SQL>
Changed in trafodion: | |
milestone: | none → r1.0 |
Changed in trafodion: | |
assignee: | Cliff Gray (cliff-gray) → Roberta Marton (roberta-marton) |
status: | New → In Progress |
Changed in trafodion: | |
status: | Fix Committed → Fix Released |
To post a comment you must log in.
The first time an update statistics is executed on a table in a schema the SB_HISTOGRAMS and SB_HISTOGRAM_ INTERVALS tables are created.
With the fix for this bug, when an showstats is executed on a schema before any update statistics is performed, the following is returned:
showstats for table tab8 on every column;
..
*** ERROR[9200] UPDATE STATISTICS for table TRAFODION. SCHEMA902. TAB8 encountered an error (4082) from statement .
*** ERROR[4082] Object TRAFODION. SCHEMA902. SB_HISTOGRAMS does not exist or is inaccessible.
*** ERROR[8822] The statement was not prepared.
--- SQL operation failed with errors.
After an update statistics is executed on any table in a schema but no update statistics has been performed against the target of a showstats statement, the following error is returned:
showstats for table tab9 on every column;
..
Histogram data for Table TRAFODION. SCHEMA902. TAB9
Table ID: 123342119817007966
Hist ID # Ints Rowcount UEC Colname(s) ======= ======= ======
========== ====== =========== =========== =======
No Histograms exist for the requested columns or groups
If an update statistics has been executed on a table and a show stats is executed, something like the following is displayed:
showstats for table tab8 on every column;
..
Histogram data for Table TRAFODION. SCHEMA902. TAB8
Table ID: 37210776631540466
Hist ID # Ints Rowcount UEC Colname(s) ======= ======= ======
========== ====== =========== =========== =======
676978449 2 2 2 A
676978444 2 2 2 B
There is a suggestion that when a new schema is created, that we also create histogram tables - will add for some future release.