diff options
author | Vicențiu Ciorbaru <vicentiu@mariadb.org> | 2019-02-15 01:23:00 +0200 |
---|---|---|
committer | Vicențiu Ciorbaru <vicentiu@mariadb.org> | 2019-02-19 12:01:21 +0200 |
commit | f0773b7842fcfd2032b630b4cfc7404a29d12a8f (patch) | |
tree | 3b00628835a73575036e3488e2613d39bc8544e0 /mysql-test/main/mysqld--help.result | |
parent | 47f15ea73c49e90b16a4a4adf5414f51bdbf97a4 (diff) | |
download | mariadb-git-f0773b7842fcfd2032b630b4cfc7404a29d12a8f.tar.gz |
Introduce analyze_sample_percentage variable
The variable controls the amount of sampling analyze table performs.
If ANALYZE table with histogram collection is too slow, one can reduce the
time taken by setting analyze_sample_percentage to a lower value of the
total number of rows.
Setting it to 0 will use a formula to compute how many rows to sample:
The number of rows collected is capped to a minimum of 50000 and
increases logarithmically with a coffecient of 4096. The coffecient is
chosen so that we expect an error of less than 3% in our estimations
according to the paper:
"Random Sampling for Histogram Construction: How much is enough?”
– Surajit Chaudhuri, Rajeev Motwani, Vivek Narasayya, ACM SIGMOD, 1998.
The drawback of sampling is that avg_frequency number is computed
imprecisely and will yeild a smaller number than the real one.
Diffstat (limited to 'mysql-test/main/mysqld--help.result')
-rw-r--r-- | mysql-test/main/mysqld--help.result | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/mysql-test/main/mysqld--help.result b/mysql-test/main/mysqld--help.result index e130f324da0..65fda40720d 100644 --- a/mysql-test/main/mysqld--help.result +++ b/mysql-test/main/mysqld--help.result @@ -15,6 +15,10 @@ The following specify which files/extra groups are read (specified before remain --alter-algorithm[=name] Specify the alter table algorithm. One of: DEFAULT, COPY, INPLACE, NOCOPY, INSTANT + --analyze-sample-percentage=# + Percentage of rows from the table ANALYZE TABLE will + sample to collect table statistics. Set to 0 to let + MariaDB decide what percentage of rows to sample. -a, --ansi Use ANSI SQL syntax instead of MySQL syntax. This mode will also set transaction isolation level 'serializable'. --auto-increment-increment[=#] @@ -1385,6 +1389,7 @@ The following specify which files/extra groups are read (specified before remain Variables (--variable-name=value) allow-suspicious-udfs FALSE alter-algorithm DEFAULT +analyze-sample-percentage 100 auto-increment-increment 1 auto-increment-offset 1 autocommit TRUE |