Comment 7 for bug 1402031

Revision history for this message
Weishiun Tsai (wei-shiun-tsai) wrote :

A quick note on what is seen on the v0106_0830 build, in which the ustat row count estimation is turned off. The stat row count for the lineitem table (the largest table, which has 11997996 rows) was still off by 720656 rows (higher than the actual number) with update stats run right after table loading. It took the 2nd run of update stats to correct this:

Here are the stats when update stats were run right after the table loading:

>>showstats for table LINEITEM on every column;

Histogram data for Table TRAFODION.G_TPCH2X.LINEITEM
Table ID: 55203448999370

   Hist ID # Ints Rowcount UEC Colname(s)
========== ====== =========== =========== ===========================
 688077107 27 12718652 2554238 L_ORDERKEY
 688077102 53 12718652 399775 L_PARTKEY
 688077097 48 12718652 20000 L_SUPPKEY
 688077092 7 12718652 7 L_LINENUMBER
 688077087 50 12718652 50 L_QUANTITY
 688077082 37 12718652 939218 L_EXTENDEDPRICE
 688077077 11 12718652 11 L_DISCOUNT
 688077072 9 12718652 9 L_TAX
 688077067 3 12718652 3 L_RETURNFLAG
 688077062 2 12718652 2 L_LINESTATUS
 688077057 50 12718652 2526 L_SHIPDATE
 688077052 50 12718652 2466 L_COMMITDATE
 688077047 50 12718652 2556 L_RECEIPTDATE
 688077042 4 12718652 4 L_SHIPINSTRUCT
 688077037 7 12718652 7 L_SHIPMODE
 688077032 62 12718652 7388302 L_COMMENT
 688077027 8 12718652 8 "_SALT_"
 688077112 1 12718652 12718652 "_SALT_", L_SHIPDATE, L_ORDERKEY, L_LINENUMBER

--- SQL operation complete.

Here are the stats after rerunning update stats:

>>showstats for table LINEITEM on every column;

Histogram data for Table TRAFODION.G_TPCH2X.LINEITEM
Table ID: 55203448999370

   Hist ID # Ints Rowcount UEC Colname(s)
========== ====== =========== =========== ===========================
 688077106 35 11997996 2532066 L_ORDERKEY
 688077103 53 11997996 399552 L_PARTKEY
 688077096 48 11997996 20000 L_SUPPKEY
 688077093 7 11997996 7 L_LINENUMBER
 688077086 50 11997996 50 L_QUANTITY
 688077083 37 11997996 939096 L_EXTENDEDPRICE
 688077076 11 11997996 11 L_DISCOUNT
 688077073 9 11997996 9 L_TAX
 688077066 3 11997996 3 L_RETURNFLAG
 688077063 2 11997996 2 L_LINESTATUS
 688077056 50 11997996 2526 L_SHIPDATE
 688077053 50 11997996 2466 L_COMMITDATE
 688077046 50 11997996 2553 L_RECEIPTDATE
 688077043 4 11997996 4 L_SHIPINSTRUCT
 688077036 7 11997996 7 L_SHIPMODE
 688077033 62 11997996 7098922 L_COMMENT
 688077026 8 11997996 8 "_SALT_"
 688077113 1 11997996 11997996 "_SALT_", L_SHIPDATE, L_ORDERKEY, L_LINENUMBER

--- SQL operation complete.