Commit bb5b0a9f authored by Igor Babaev's avatar Igor Babaev

Merge from mwl253

parents d312bb0b 7a565cd9
......@@ -1416,6 +1416,7 @@ WORLD_INNODB CITY Country 1 17.5819
WORLD_INNODB COUNTRYLANGUAGE PRIMARY 1 4.2232
WORLD_INNODB COUNTRYLANGUAGE PRIMARY 2 1.0000
WORLD_INNODB COUNTRYLANGUAGE Percentage 1 2.7640
use world;
set use_stat_tables='preferably';
set histogram_size=100;
set histogram_type='SINGLE_PREC_HB';
......@@ -1424,22 +1425,10 @@ set histogram_size=254;
set histogram_type='DOUBLE_PREC_HB';
ANALYZE TABLE City;
FLUSH TABLES;
select db_name,table_name,column_name,min_value,max_value,nulls_ratio,avg_length,avg_frequency,hist_size,hist_type,hex(histogram),decode_histogram(histogram,hist_type) from mysql.column_stats where column_name = 'Percentage';;
db_name world
table_name CountryLanguage
column_name Percentage
min_value 0.0
max_value 99.9
nulls_ratio 0.0000
avg_length 4.0000
avg_frequency 2.7640
hist_size 0
hist_type NULL
hex(histogram) NULL
decode_histogram(histogram,hist_type) NULL
db_name world_innodb
table_name CountryLanguage
column_name Percentage
select UPPER(db_name),UPPER(table_name),UPPER(column_name),min_value,max_value,nulls_ratio,avg_length,avg_frequency,hist_size,hist_type,hex(histogram),decode_histogram(histogram,hist_type) from mysql.column_stats where UPPER(db_name)='WORLD' and UPPER(table_name)='COUNTRYLANGUAGE' and UPPER(column_name) = 'PERCENTAGE';;
UPPER(db_name) WORLD
UPPER(table_name) COUNTRYLANGUAGE
UPPER(column_name) PERCENTAGE
min_value 0.0
max_value 99.9
nulls_ratio 0.0000
......@@ -1449,46 +1438,10 @@ hist_size 100
hist_type SINGLE_PREC_HB
hex(histogram) 0000000000000000000000000101010101010101010202020303030304040404050505050606070707080809090A0A0B0C0D0D0E0E0F10111213131415161718191B1C1E202224292A2E33373B4850575F6A76818C9AA7B9C4CFDADFE5EBF0F4F8FAFCFF
decode_histogram(histogram,hist_type) 0.000,0.000,0.000,0.000,0.000,0.000,0.000,0.000,0.000,0.000,0.000,0.000,0.004,0.000,0.000,0.000,0.000,0.000,0.000,0.000,0.000,0.004,0.000,0.000,0.004,0.000,0.000,0.000,0.004,0.000,0.000,0.000,0.004,0.000,0.000,0.000,0.004,0.000,0.004,0.000,0.000,0.004,0.000,0.004,0.000,0.004,0.000,0.004,0.004,0.004,0.000,0.004,0.000,0.004,0.004,0.004,0.004,0.004,0.000,0.004,0.004,0.004,0.004,0.004,0.004,0.008,0.004,0.008,0.008,0.008,0.008,0.020,0.004,0.016,0.020,0.016,0.016,0.051,0.031,0.027,0.031,0.043,0.047,0.043,0.043,0.055,0.051,0.071,0.043,0.043,0.043,0.020,0.024,0.024,0.020,0.016,0.016,0.008,0.008,0.012,0.000
select db_name,table_name,column_name,min_value,max_value,nulls_ratio,avg_length,avg_frequency,hist_size,hist_type,hex(histogram),decode_histogram(histogram,hist_type) from mysql.column_stats where column_name = 'Population';;
db_name world
table_name Country
column_name Population
min_value 0
max_value 1277558000
nulls_ratio 0.0000
avg_length 4.0000
avg_frequency 1.0575
hist_size 0
hist_type NULL
hex(histogram) NULL
decode_histogram(histogram,hist_type) NULL
db_name world
table_name City
column_name Population
min_value 42
max_value 10500000
nulls_ratio 0.0000
avg_length 4.0000
avg_frequency 1.0467
hist_size 0
hist_type NULL
hex(histogram) NULL
decode_histogram(histogram,hist_type) NULL
db_name world_innodb
table_name Country
column_name Population
min_value 0
max_value 1277558000
nulls_ratio 0.0000
avg_length 4.0000
avg_frequency 1.0575
hist_size 0
hist_type NULL
hex(histogram) NULL
decode_histogram(histogram,hist_type) NULL
db_name world_innodb
table_name City
column_name Population
select UPPER(db_name),UPPER(table_name),UPPER(column_name),min_value,max_value,nulls_ratio,avg_length,avg_frequency,hist_size,hist_type,hex(histogram),decode_histogram(histogram,hist_type) from mysql.column_stats where UPPER(db_name)='WORLD' and UPPER(table_name)='CITY' and UPPER(column_name) = 'POPULATION';;
UPPER(db_name) WORLD
UPPER(table_name) CITY
UPPER(column_name) POPULATION
min_value 42
max_value 10500000
nulls_ratio 0.0000
......
......@@ -564,6 +564,7 @@ SELECT UPPER(db_name), UPPER(table_name),
index_name, prefix_arity, avg_frequency
FROM mysql.index_stats;
use world;
set use_stat_tables='preferably';
--disable_result_log
set histogram_size=100;
......@@ -575,15 +576,15 @@ ANALYZE TABLE City;
FLUSH TABLES;
--enable_result_log
--query_vertical select db_name,table_name,column_name,min_value,max_value,nulls_ratio,avg_length,avg_frequency,hist_size,hist_type,hex(histogram),decode_histogram(histogram,hist_type) from mysql.column_stats where column_name = 'Percentage';
--query_vertical select db_name,table_name,column_name,min_value,max_value,nulls_ratio,avg_length,avg_frequency,hist_size,hist_type,hex(histogram),decode_histogram(histogram,hist_type) from mysql.column_stats where column_name = 'Population';
--query_vertical select UPPER(db_name),UPPER(table_name),UPPER(column_name),min_value,max_value,nulls_ratio,avg_length,avg_frequency,hist_size,hist_type,hex(histogram),decode_histogram(histogram,hist_type) from mysql.column_stats where UPPER(db_name)='WORLD' and UPPER(table_name)='COUNTRYLANGUAGE' and UPPER(column_name) = 'PERCENTAGE';
--query_vertical select UPPER(db_name),UPPER(table_name),UPPER(column_name),min_value,max_value,nulls_ratio,avg_length,avg_frequency,hist_size,hist_type,hex(histogram),decode_histogram(histogram,hist_type) from mysql.column_stats where UPPER(db_name)='WORLD' and UPPER(table_name)='CITY' and UPPER(column_name) = 'POPULATION';
set histogram_type=default;
set histogram_size=default;
use test;
DROP DATABASE world;
SELECT UPPER(db_name), UPPER(table_name), cardinality
FROM mysql.table_stats;
SELECT UPPER(db_name), UPPER(table_name),
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment