| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
| |
stopped with no-zero size)
|
|
|
|
|
| |
The function table_cond_selectivity() should take into account that condition selectivity
for some fields can be set to 0.
|
|
|
|
|
|
| |
when
table names are case-insensitive.
|
|
|
|
|
|
| |
The function get_column_range_cardinality() returned a wrong result for any column
containing only null values.
|
|
|
|
| |
Field::selectivity should be set for all fields used in range conditions.
|
| |
|
|
|
|
|
| |
- Show a line with "Engine-independent statistics collected" when ANALYZE command
caused EITS statistics to be recollected.
|
|
|
|
|
| |
- Move [some] engine-agnostic tests from t/selectivity.test to t/selectivity_no_engine.test
- Move Histogram::point_selectivity to sql_statistics.cc
|
|\ |
|
| |
| |
| |
| |
| |
| | |
- Histogram::find_bucket() should not walk off the end of the value range.
- Address review feedback in Histogram::point_selectivity(): different handling
for zero-width buckets, and explanations.
|
| |
| |
| |
| |
| |
| | |
- Fix Histogram::point_selectivity() to work in the case where the
passed value_pos=0 (or 1) and the first (or the last) bucket in the
histogram has zero value-range (i.e one value).
|
| |
| |
| |
| |
| |
| |
| |
| | |
[Attempt #2]
- Use a new selectivity calculation formula in Histogram::point_selectivity.
The formula is different from the old one because it was developed from scratch.
it doesn't have any possible division-by-zero problems.
|
|/
|
|
|
|
| |
After constant table row substitution the where condition may be converted
to always true. The function calculate_cond_selectivity_for_table() should
take into account this possibility.
|
|
|
|
|
|
| |
estimates
- Save range key before making field->pos_in_interval() call (like we do for non-equality ranges)
|
|\ |
|
| |
| |
| |
| |
| | |
Corrected cost estimates when a join buffer is used and the optimizer is requested
to use condition selectivities.
|
|\ \ |
|
| | |
| | |
| | |
| | |
| | |
| | | |
The function calculate_cond_selectivity_for_table() must consider
the case when the key range tree returned by the call of get_mm_tree()
is of the type SEL_TREE::ALWAYS.
|
|\ \ \
| |/ / |
|
| |/
| |
| |
| | |
Do not calculate selectivity of conditions for the tables of the information schema.
|
| |
| |
| |
| | |
The bug was fixed by the patch applied to the 5.3 tree in the revision 3727.
|
|\ \
| |/ |
|
| |
| |
| |
| |
| |
| | |
- Pass more tests
- select with subselects is now shown with type=PRIMARY where it used to be (incorrectly) 'SIMPLE'
|
|/
|
|
| |
a special handling.
|
|
|
|
|
| |
This bug in the code of get_column_range_cardinality() could lead to
wrong estimates of number of records in ranges for non-nullable columns.
|
|
|
|
| |
Sampling of selectivity of LIKE predicate.
|
|
|
|
|
|
| |
tables retrieved by range scans.
Added comments forgotten in the previous patch.
|
|
|
|
| |
The selectivity of a range degenerated into a point never should be set to 0.
|
|
|
|
|
|
|
|
| |
Uninitialized field next_equal_field of the Field objects created
for the fields of a temporary table could hang the server.
|
|
|
|
|
| |
Uninitialized field cond_selectivity of the Field objects created
for the fields of a temporary table could cause an assertion abort.
|
|
|
|
|
|
| |
When calculating the selectivity of a range in the function
get_column_range_cardinality a check whether NULL values are
included into into the range must be done.
|
|
|
|
|
| |
Range analysis of non-indexed columns should handle properly range trees
with type == SEL_TREE::MAYBE.
|
|
|
|
| |
Valgrind complained on usage of uninitialized memory.
|
|
|
|
|
|
| |
The values of the column HIST_TYPE from the statistical table
mysql.column_stats were stored in the table and read from the
table incorrectly.
|
|
|
|
| |
Avoid possible division by 0.
|
|
|
|
|
|
| |
Don't try to a histogram if it is not read into the cache for statistical data.
It may happen so if optimizer_use_condition_selectivity is set to 3. This
setting orders the optimizer not use histograms to calculate selectivity.
|
|
|
|
|
|
| |
When performing the range analysis for a conjunction the function
calculate_cond_selectivity_for_table should take in to account that
the analysis of some conjuncts may return SEL_ARG::IMPOSSIBLE.
|
|
|
|
|
| |
When calculating selectivity of conditions one should take into account
the cases when some tables to be joined are empty.
|
|
|
|
|
|
| |
Wrong formulas used by the function Histogram::point_selectivity()
could result in a negative value of selectivity returned by the
function.
|
|
|
|
|
| |
Range analysis of the condition for a non-indexed column may
return an impossible range. This must be taken into account.
|
|
|
|
| |
The bug was caused a wrong casting.
|
|
|
|
| |
calculating selectivity of conditions.
|
| |
|
|\ |
|
| |
| |
| |
| | |
Introduced double precision height-balanced histograms.
|
|/
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
One of them is quite serious: the function table_cond_selectivity used
the TABLE_REF structure for ref/eq_ref access methods as if they had been
filled. In fact these structure are filled after the best execution plan
has been chosen.
The other bugs happened due to:
- an erroneous attempt at get statistics on the result of materialization
of a view
- incorrect handling of ranges with no left/right limits when calculating
selectivity of range conditions on non-indexed columns
- lack of cleanup for some newly introduced fields
|
| |
|
|
|