On Sun, Dec 8, 2013 at 12:06 AM, Mark Kirkwood <mark.kirkw...@catalyst.net.nz> wrote: > > bench=# ANALYZE pgbench_accounts; > NOTICE: acquire sample will need 30000 blocks > NOTICE: sampled 30000 blocks > ANALYZE > Time: 10059.446 ms > bench=# \q
I did some experimenting here as well. I hacked up a version of analyze.c that has a guc for rows_per_block to sample. Setting it to 1 doesn't modify the behaviour at all whereas setting it to 4 divides the number of blocks to sample by 4 which causes it to do less I/O and use more rows from each block. I then initialized pgbench with scale factor 100 but modified the code to run the actual pgbench with scale factor 1. In other words I ran a lot of updates on 1% of the database but left the other 99% untouched from the initial load. Then I ran "ANALYZE VERBOSE accounts" with rows_per_block set to 1, 4, 16, and 64. The latter is slightly larger than the average number of tuples per block so the resulting sample is actually slightly short. The whole accounts table is 1.2GB and contains 10 million rows. As expected with rows_per_block set to 1 it reads 240MB of that containing nearly 2 million rows (and takes nearly 20s -- doing a full table scan for select count(*) only takes about 5s): stark=# analyze verbose pgbench_accounts; INFO: analyzing "public.pgbench_accounts" INFO: "pgbench_accounts": scanned 30000 of 158756 pages, containing 1889701 live rows and 0 dead rows; 30000 rows in sample, 10000036 estimated total rows ANALYZE Time: 19468.987 ms With rows_per_block=4 it reads only a quarter as many blocks but it's not much faster: stark=# analyze verbose pgbench_accounts; INFO: analyzing "public.pgbench_accounts" INFO: "pgbench_accounts": scanned 7501 of 158756 pages, containing 472489 live rows and 0 dead rows; 30000 rows in sample, 10000037 estimated total rows ANALYZE Time: 17062.331 ms But with rows_per_block=16 it's much faster, 6.7s stark=# set statistics_rows_per_block = 16; SET Time: 1.583 ms stark=# analyze verbose pgbench_accounts; INFO: analyzing "public.pgbench_accounts" INFO: "pgbench_accounts": scanned 1876 of 158756 pages, containing 118163 live rows and 0 dead rows; 30000 rows in sample, 10000031 estimated total rows ANALYZE Time: 6694.331 ms And with rows_per_block=64 it's under 2s: stark=# set statistics_rows_per_block = 64; SET Time: 0.693 ms stark=# analyze verbose pgbench_accounts; INFO: analyzing "public.pgbench_accounts" INFO: "pgbench_accounts": scanned 469 of 158756 pages, containing 29544 live rows and 0 dead rows; 29544 rows in sample, 10000033 estimated total rows ANALYZE Time: 1937.055 ms The estimates for the total rows is just as accurate in every case. (It seems to be consistently sightly high though which is a bit disconcerting) However looking at the actual pg_stats entries the stats are noticeably less accurate for the "blockier" samples. The "bid" column actually has 100 distinct values and so with a statistics_target of 100 each value should appear in the MCV list with a frequency of about .01. With rows_per_block=1 the MCV frequency list ranges from .0082 to .0123 With rows_per_block=4 the MCV frequency list ranges from .0063 to .0125 With rows_per_block=16 the MCV frequency list ranges from .0058 to .0164 With rows_per_block=64 the MCV frequency list ranges from .0021 to .0213 I'm not really sure if this is due to the blocky sample combined with the skewed pgbench run or not. It doesn't seem to be consistently biasing towards or against bid 1 which I believe are the only rows that would have been touched by pgbench. Still it's suspicious that they seem to be consistently getting less accurate as the blockiness increases. I've attached the results of pg_stats following the analyze with the various levels of "blockiness". -- greg
stark=# set statistics_rows_per_block = 1; SET Time: 1.363 ms stark=# analyze verbose pgbench_accounts; INFO: analyzing "public.pgbench_accounts" INFO: "pgbench_accounts": scanned 30000 of 158756 pages, containing 1889701 live rows and 0 dead rows; 30000 rows in sample, 10000036 estimated total rows ANALYZE Time: 19468.987 ms stark=# select * from pg_stats where tablename = 'pgbench_accounts'; -[ RECORD 1 ]----------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- schemaname | public tablename | pgbench_accounts attname | aid inherited | f null_frac | 0 avg_width | 4 n_distinct | -1 most_common_vals | most_common_freqs | histogram_bounds | {28,104192,200678,303098,394526,495319,581380,676383,778400,871531,981135,1099089,1188577,1290346,1403514,1494518,1603140,1702575,1812104,1900841,1994997,2110081,2212974,2305156,2405220,2497654,2588126,2700639,2782477,2875031,2986767,3085542,3198418,3293853,3390334,3486023,3606682,3711733,3821283,3915116,4010554,4112022,4204679,4311240,4418875,4512328,4605674,4693281,4788899,4902359,5005042,5112068,5213858,5296334,5397529,5493860,5597099,5703193,5794797,5897024,6003480,6095076,6188493,6279813,6392369,6483392,6585393,6681827,6784453,6871210,6975424,7092623,7192013,7300736,7392614,7479044,7571874,7677909,7784437,7884291,7982553,8081123,8192038,8289890,8405175,8508763,8610527,8716844,8804260,8906299,9009119,9117126,9215228,9323524,9424473,9508262,9606505,9709630,9795147,9901893,9998008} correlation | 0.999204 most_common_elems | most_common_elem_freqs | elem_count_histogram | -[ RECORD 2 ]----------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- schemaname | public tablename | pgbench_accounts attname | bid inherited | f null_frac | 0 avg_width | 4 n_distinct | 100 most_common_vals | {28,6,95,47,53,75,69,98,42,52,61,74,12,65,19,33,58,88,68,46,63,4,15,92,26,39,7,20,45,62,24,76,81,22,25,2,40,83,55,78,13,90,48,100,9,34,96,97,23,87,5,35,72,3,8,54,86,17,31,59,29,41,56,66,80,50,67,79,1,18,93,44,89,99,37,73,60,30,57,85,94,64,77,16,70,38,27,43,10,32,82,91,51,49,14,84,11,21,36,71} most_common_freqs | {0.0123333,0.0114667,0.0114333,0.0114,0.0113,0.0111333,0.0110667,0.0110667,0.011,0.0109667,0.0109667,0.0109,0.0108667,0.0108667,0.0108333,0.0107667,0.0107667,0.0107667,0.0107333,0.0107,0.0107,0.0106667,0.0106667,0.0106667,0.0106333,0.0106,0.0105333,0.0105333,0.0105333,0.0105333,0.0105,0.0105,0.0105,0.0104333,0.0104333,0.0103667,0.0103667,0.0103667,0.0103,0.0103,0.0102667,0.0102667,0.0102,0.0102,0.0101333,0.0101333,0.0101333,0.0101,0.0100333,0.0100333,0.01,0.01,0.01,0.00993333,0.00993333,0.0099,0.0099,0.00986667,0.00986667,0.00986667,0.00976667,0.00976667,0.00976667,0.00976667,0.00973333,0.0097,0.00966667,0.00956667,0.00953333,0.00953333,0.00953333,0.00943333,0.00943333,0.00943333,0.0094,0.0094,0.00933333,0.00926667,0.00926667,0.00926667,0.00926667,0.00923333,0.00923333,0.0092,0.0092,0.00916667,0.00913333,0.00913333,0.00903333,0.00893333,0.0089,0.0089,0.00873333,0.0087,0.00856667,0.00856667,0.00846667,0.0084,0.00826667,0.00816667} histogram_bounds | correlation | 0.999215 most_common_elems | most_common_elem_freqs | elem_count_histogram | -[ RECORD 3 ]----------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- schemaname | public tablename | pgbench_accounts attname | abalance inherited | f null_frac | 0 avg_width | 4 n_distinct | 37 most_common_vals | {0} most_common_freqs | {0.9988} histogram_bounds | {-4845,-4596,-4530,-4491,-3756,-3612,-3392,-3389,-3334,-2639,-2490,-2074,-1894,-1871,-1720,-1509,-1228,-916,-603,-295,144,726,774,1003,1494,1583,2081,2082,2268,2338,2408,2879,3005,3467,3587,4396} correlation | 0.997222 most_common_elems | most_common_elem_freqs | elem_count_histogram | -[ RECORD 4 ]----------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- schemaname | public tablename | pgbench_accounts attname | filler inherited | f null_frac | 0 avg_width | 85 n_distinct | 1 most_common_vals | {" "} most_common_freqs | {1} histogram_bounds | correlation | 1 most_common_elems | most_common_elem_freqs | elem_count_histogram | Time: 6.009 ms stark=# set statistics_rows_per_block = 4; SET Time: 1.780 ms stark=# analyze verbose pgbench_accounts; INFO: analyzing "public.pgbench_accounts" INFO: "pgbench_accounts": scanned 7501 of 158756 pages, containing 472489 live rows and 0 dead rows; 30000 rows in sample, 10000037 estimated total rows ANALYZE Time: 17062.331 ms stark=# select * from pg_stats where tablename = 'pgbench_accounts'; -[ RECORD 1 ]----------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ schemaname | public tablename | pgbench_accounts attname | aid inherited | f null_frac | 0 avg_width | 4 n_distinct | -1 most_common_vals | most_common_freqs | histogram_bounds | {193,108917,184310,287956,422931,531014,651407,769898,867300,968077,1051098,1148329,1259817,1359840,1449259,1564827,1664382,1756400,1868606,1975441,2065424,2174440,2256204,2374350,2471994,2596820,2695552,2790542,2891360,2980174,3072785,3169003,3284751,3386083,3487766,3586089,3680422,3766596,3895931,3981250,4073452,4189760,4307905,4397789,4478034,4575352,4670697,4776353,4884534,4990972,5090092,5181188,5282208,5365547,5462130,5585843,5695036,5805312,5902236,6012414,6123662,6216001,6306078,6393377,6467964,6582553,6676975,6779758,6882073,6993208,7084399,7174676,7281340,7381977,7476349,7570502,7673163,7766768,7875440,7964227,8081118,8166641,8242378,8347583,8432891,8534819,8639157,8731523,8824238,8925546,9016555,9111233,9216298,9294426,9386705,9504246,9603260,9699542,9816800,9894442,9999067} correlation | 1 most_common_elems | most_common_elem_freqs | elem_count_histogram | -[ RECORD 2 ]----------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ schemaname | public tablename | pgbench_accounts attname | bid inherited | f null_frac | 0 avg_width | 4 n_distinct | 100 most_common_vals | {45,65,99,83,82,2,10,23,93,40,53,63,31,64,74,54,38,71,89,21,91,46,29,36,37,28,78,48,67,44,69,76,88,97,8,90,14,85,11,59,72,96,50,75,13,34,19,80,25,84,51,17,62,92,18,42,87,3,27,52,55,5,94,16,15,30,86,41,81,68,100,33,73,32,61,1,79,35,20,57,77,47,9,70,60,12,58,95,7,43,24,56,22,66,26,98,6,49,39,4} most_common_freqs | {0.0124667,0.0124333,0.0124333,0.0123,0.0122333,0.0119667,0.0119,0.0118333,0.0117667,0.0115333,0.0115333,0.0115,0.0113,0.0112667,0.0111667,0.0111,0.0110667,0.0110333,0.0110333,0.011,0.0109667,0.0109333,0.0108667,0.0108333,0.0108,0.0106667,0.0106333,0.0106,0.0106,0.0105667,0.0105333,0.0104333,0.0104333,0.0104333,0.0104,0.0104,0.0103667,0.0102667,0.0102333,0.0102333,0.0102333,0.0102333,0.0102,0.0102,0.0101667,0.0101667,0.0101333,0.0101333,0.0101,0.0101,0.0100667,0.0100333,0.01,0.01,0.00996667,0.00996667,0.00996667,0.0098,0.00973333,0.00973333,0.00973333,0.0097,0.0097,0.00966667,0.0096,0.0096,0.0096,0.00956667,0.00953333,0.0095,0.0095,0.00946667,0.00946667,0.00936667,0.00936667,0.00933333,0.00923333,0.0092,0.00916667,0.00906667,0.00906667,0.00903333,0.00896667,0.00893333,0.00886667,0.00873333,0.0087,0.00863333,0.0086,0.00843333,0.00836667,0.00833333,0.00823333,0.00823333,0.00816667,0.00806667,0.00763333,0.00756667,0.00673333,0.00633333} histogram_bounds | correlation | 1 most_common_elems | most_common_elem_freqs | elem_count_histogram | -[ RECORD 3 ]----------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ schemaname | public tablename | pgbench_accounts attname | abalance inherited | f null_frac | 0 avg_width | 4 n_distinct | 26 most_common_vals | {0} most_common_freqs | {0.999167} histogram_bounds | {-4894,-4611,-4605,-4343,-4224,-3333,-3058,-3055,-2942,-2186,-1366,-1312,-325,242,338,1419,1508,1570,1682,1799,1918,3388,4093,4220,4655} correlation | 0.997619 most_common_elems | most_common_elem_freqs | elem_count_histogram | -[ RECORD 4 ]----------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ schemaname | public tablename | pgbench_accounts attname | filler inherited | f null_frac | 0 avg_width | 85 n_distinct | 1 most_common_vals | {" "} most_common_freqs | {1} histogram_bounds | correlation | 1 most_common_elems | most_common_elem_freqs | elem_count_histogram | Time: 29.016 ms stark=# set statistics_rows_per_block = 16; SET Time: 1.583 ms stark=# analyze verbose pgbench_accounts; INFO: analyzing "public.pgbench_accounts" INFO: "pgbench_accounts": scanned 1876 of 158756 pages, containing 118163 live rows and 0 dead rows; 30000 rows in sample, 10000031 estimated total rows ANALYZE Time: 6694.331 ms stark=# select * from pg_stats where tablename = 'pgbench_accounts'; -[ RECORD 1 ]----------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- schemaname | public tablename | pgbench_accounts attname | aid inherited | f null_frac | 0 avg_width | 4 n_distinct | -1 most_common_vals | most_common_freqs | histogram_bounds | {13862,70779,164248,282248,402810,519400,598949,721566,821042,935368,992735,1074927,1150235,1277189,1395695,1469067,1614570,1724549,1814179,1896055,2020598,2109893,2215261,2319517,2411795,2481590,2594936,2709644,2823091,2883587,3007373,3095434,3236649,3296118,3446394,3511130,3618634,3692484,3765866,3866598,3977082,4082307,4174757,4243742,4334071,4443717,4534286,4644351,4771538,4897773,4969990,5048877,5196750,5258481,5361021,5452006,5587463,5686020,5777139,5881108,5968956,6066552,6184135,6294314,6410872,6515320,6608438,6679721,6805323,6935508,7050201,7186499,7291529,7353748,7438332,7528467,7632677,7743287,7858372,7986415,8058743,8208929,8304318,8363286,8444019,8570412,8675679,8762016,8845116,8959332,9042264,9130367,9207044,9306681,9402931,9484463,9589038,9708634,9811368,9916642,9998226} correlation | 1 most_common_elems | most_common_elem_freqs | elem_count_histogram | -[ RECORD 2 ]----------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- schemaname | public tablename | pgbench_accounts attname | bid inherited | f null_frac | 0 avg_width | 4 n_distinct | 100 most_common_vals | {10,84,67,33,75,19,88,29,50,38,11,2,43,90,25,1,37,95,6,100,35,73,22,53,91,31,15,92,47,94,81,58,24,74,99,54,12,56,44,42,76,61,59,80,60,66,57,63,93,83,96,51,65,23,8,36,41,39,46,18,27,17,14,87,28,70,21,26,49,5,77,40,85,97,86,71,55,45,78,64,7,52,98,13,62,69,79,48,89,4,3,16,72,30,82,68,32,20,34,9} most_common_freqs | {0.0164,0.0162333,0.0150333,0.0144333,0.0143667,0.0143,0.0140667,0.0137333,0.0135,0.0134333,0.0134,0.0133333,0.0131,0.0130333,0.0125,0.0124,0.0124,0.0123333,0.0122333,0.0121667,0.0121,0.0120667,0.0116,0.0115667,0.0113,0.0112,0.0111667,0.0110667,0.0109,0.0108667,0.0107667,0.0107333,0.0107,0.0107,0.0106667,0.0105667,0.0105,0.0105,0.0104333,0.0103333,0.0102667,0.0102333,0.0101333,0.0101,0.0100667,0.0100333,0.00993333,0.00993333,0.00993333,0.0098,0.00976667,0.00973333,0.00973333,0.0097,0.00966667,0.00966667,0.00966667,0.00953333,0.00953333,0.0095,0.00946667,0.0093,0.00926667,0.00926667,0.0091,0.00906667,0.009,0.0089,0.00883333,0.00876667,0.0087,0.00843333,0.00836667,0.0083,0.00826667,0.0081,0.00806667,0.00796667,0.00796667,0.00786667,0.00783333,0.0078,0.00766667,0.00753333,0.00753333,0.00753333,0.00753333,0.0072,0.00713333,0.007,0.00683333,0.0068,0.00673333,0.00663333,0.00636667,0.00616667,0.00603333,0.00593333,0.0059,0.00576667} histogram_bounds | correlation | 1 most_common_elems | most_common_elem_freqs | elem_count_histogram | -[ RECORD 3 ]----------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- schemaname | public tablename | pgbench_accounts attname | abalance inherited | f null_frac | 0 avg_width | 4 n_distinct | 29 most_common_vals | {0} most_common_freqs | {0.999067} histogram_bounds | {-4708,-4498,-4269,-3915,-3166,-2865,-2579,-1795,-1203,-1041,-563,-536,-527,-502,370,523,1133,1889,1980,2836,2961,3139,3628,3871,4318,4547,4596,5589} correlation | 0.997245 most_common_elems | most_common_elem_freqs | elem_count_histogram | -[ RECORD 4 ]----------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- schemaname | public tablename | pgbench_accounts attname | filler inherited | f null_frac | 0 avg_width | 85 n_distinct | 1 most_common_vals | {" "} most_common_freqs | {1} histogram_bounds | correlation | 1 most_common_elems | most_common_elem_freqs | elem_count_histogram | Time: 28.368 ms stark=# set statistics_rows_per_block = 64; SET Time: 0.693 ms stark=# analyze verbose pgbench_accounts; INFO: analyzing "public.pgbench_accounts" INFO: "pgbench_accounts": scanned 469 of 158756 pages, containing 29544 live rows and 0 dead rows; 29544 rows in sample, 10000033 estimated total rows ANALYZE Time: 1937.055 ms stark=# select * from pg_stats where tablename = 'pgbench_accounts'; -[ RECORD 1 ]----------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- schemaname | public tablename | pgbench_accounts attname | aid inherited | f null_frac | 0 avg_width | 4 n_distinct | -1 most_common_vals | most_common_freqs | histogram_bounds | {22177,209207,308538,381977,456423,531122,595677,684866,755721,835963,856671,965011,1063398,1163359,1316619,1373551,1513517,1679062,1785827,1844902,1872350,1950955,2165324,2306298,2404433,2496015,2595095,2728635,2783048,2883954,2912473,3105990,3203368,3291990,3434665,3598257,3701179,3821615,3925609,3995897,4067635,4135025,4339567,4434236,4614648,4686890,4749681,4820852,4921821,4984991,5140644,5186551,5270574,5324608,5487129,5581924,5643897,5696104,5823344,5922613,6006761,6068041,6109727,6155068,6330629,6410304,6441659,6625725,6722852,6892995,6999761,7086681,7184311,7266822,7412521,7502844,7764463,7837209,7986814,8034548,8097592,8231006,8324794,8385065,8500903,8557142,8664663,8696585,8849655,8914085,9065076,9164912,9299334,9338248,9362106,9475990,9603609,9640507,9728940,9866260,9976176} correlation | 1 most_common_elems | most_common_elem_freqs | elem_count_histogram | -[ RECORD 2 ]----------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- schemaname | public tablename | pgbench_accounts attname | bid inherited | f null_frac | 0 avg_width | 4 n_distinct | 99 most_common_vals | {19,57,94,6,9,14,52,61,81,86,4,28,62,97,33,47,50,83,87,89,8,11,25,39,41,42,49,60,65,73,84,91,7,16,24,29,30,40,48,53,55,70,71,75,99,3,5,10,18,20,26,32,35,36,38,44,45,54,56,58,64,67,69,72,78,79,80,93,95,96,100,12,21,22,27,37,59,66,68,76,85,92,1,15,17,23,34,46,63,74,90,98,2,13,31,43,77,82,88} most_common_freqs | {0.0213241,0.0213241,0.0213241,0.0191917,0.0191917,0.0191917,0.0191917,0.0191917,0.0191917,0.0191917,0.0170593,0.0170593,0.0170593,0.0170593,0.0149269,0.0149269,0.0149269,0.0149269,0.0149269,0.0149269,0.0127945,0.0127945,0.0127945,0.0127945,0.0127945,0.0127945,0.0127945,0.0127945,0.0127945,0.0127945,0.0127945,0.0127945,0.0106621,0.0106621,0.0106621,0.0106621,0.0106621,0.0106621,0.0106621,0.0106621,0.0106621,0.0106621,0.0106621,0.0106621,0.0106621,0.00852965,0.00852965,0.00852965,0.00852965,0.00852965,0.00852965,0.00852965,0.00852965,0.00852965,0.00852965,0.00852965,0.00852965,0.00852965,0.00852965,0.00852965,0.00852965,0.00852965,0.00852965,0.00852965,0.00852965,0.00852965,0.00852965,0.00852965,0.00852965,0.00852965,0.00852965,0.00639724,0.00639724,0.00639724,0.00639724,0.00639724,0.00639724,0.00639724,0.00639724,0.00639724,0.00639724,0.00639724,0.00629569,0.00426483,0.00426483,0.00426483,0.00426483,0.00426483,0.00426483,0.00426483,0.00426483,0.00426483,0.00213241,0.00213241,0.00213241,0.00213241,0.00213241,0.00213241,0.00213241} histogram_bounds | correlation | 1 most_common_elems | most_common_elem_freqs | elem_count_histogram | -[ RECORD 3 ]----------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- schemaname | public tablename | pgbench_accounts attname | abalance inherited | f null_frac | 0 avg_width | 4 n_distinct | 21 most_common_vals | {0} most_common_freqs | {0.999323} histogram_bounds | {-4726,-4352,-4058,-3392,-2922,-1523,-685,-39,132,1108,1187,1211,1680,2915,2922,3214,3356,3382,4216,4483} correlation | 0.997583 most_common_elems | most_common_elem_freqs | elem_count_histogram | -[ RECORD 4 ]----------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- schemaname | public tablename | pgbench_accounts attname | filler inherited | f null_frac | 0 avg_width | 85 n_distinct | 1 most_common_vals | {" "} most_common_freqs | {1} histogram_bounds | correlation | 1 most_common_elems | most_common_elem_freqs | elem_count_histogram | Time: 41.904 ms
-- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-hackers