Hi,
I have some tables for which stats are collected using block sampling.
Is there a data dictionary view that can tell me which tables stats have block sampling on them?
Thanks
Jay
Printable View
Hi,
I have some tables for which stats are collected using block sampling.
Is there a data dictionary view that can tell me which tables stats have block sampling on them?
Thanks
Jay
dba_tables
I checked dba_tables before and could not find any column that suggested if the stats were collected using block or row sampling method.
Regards
Jay
Check SAMPLE_SIZE column in DBA_TABLES.
If you used DBMS_STATS package with " estimate_percent => xx " for row sampling instead of block sampling then you will see the value in SAMPLE_SIZE column.
Thanks,
the column Sample_size has a number value in it, how do we determine if it was gathered using row/block sampling?
well, I am not sure if we have any thumb rule to find that. My best guess is, you can only identify if you are sure that you have taken estimate_percent some value less than 100 like 30 or 40.
block_sample - NUM_ROWS = SAMPLE_SIZE
estimate_percent - NUM_ROWS != SAMPLE_SIZE
Some one please correct me if i am wrong.
Thanks,
I don't think Oracle keeps track on where you asked for blocks or rows sampling.
At the end of the line Oracle would sample rows, whatever random rows when you ask for rows or all the rows in a sample of blocks when you ask for blocks.
In general you are going to get a better random sample when asking for rows.