All Forums Database
oshun 43 posts Joined 07/10
27 Sep 2015
SHOW Statistics - Meaning of AvgRowsPerBlock

Could somebody help me with the AvgRowsPerBlock column returned in SHOW STATISTICS. 

I have a table with  large columns (each about 64KB) and a datablock size of 256KB. On average i would expect 4 rows per data block. BUt if i run SHOW STATISTICS, the returned value is 337.50. Does anybody know why this number is much higher?
Thanks in advance

                ON TheDatabase.TheTable
 /* Version               */ 6,
 /* AvgRowsPerBlock       */ 337.500000,
 /* AvgBlockSize (bytes)  */ 256512.000000,
 /* AvgRowSize            */ 64033.000000,

visit my private blog at
dnoeth 4628 posts Joined 11/04
27 Sep 2015

Hi Roland,
I noticed exactly the same:
AvgRowSize and AvgBlockSize are both correct (vertified by Ferret and COLLECT DEMOGRAPHICS) and AvgRowsPerBlock returns values much higher or lower than expected, including impossible values like 80000.
I never care about it :-) 


ToddAWalter 316 posts Joined 10/11
28 Sep 2015

Optimizer team has opened a bug report to fix the calculation. Good news is that Dieter's solution to ignore it is fine since that value is not used in query optimization from that source.

oshun 43 posts Joined 07/10
29 Sep 2015

I wonder if this information is available somewhere else? I am asking because as far as I know is the usage of secondary indexes dependend from the average rows per data block(in order to determine selectivity)?

I was hoping that this information shown in the SHOW STATISTICS would be used by the Optimizer...and i could use it to estimate index usage.

visit my private blog at

ToddAWalter 316 posts Joined 10/11
05 Oct 2015

You could do the division yourself. It would be close enough. avgblocksize/avgrowsize

You must sign in to leave a comment.