Commit graph

11 commits

Author SHA1 Message Date
Sergei Golubchik
3d4dbe4d94 avoid uppercase table aliases tests - they're not portable 2014-06-11 19:08:06 +02:00
Sergey Petrunya
aeb62282a2 MDEV-5985: EITS: selectivity estimates look illogical for join and non-key equalities
Part#1. 

table_cond_selectivity() should discount selectivity of table' 
conditions only when ity counts that selectivity to begin with. 

For non-ref-based access methods (ALL/range/index_merge/etc),
we start with sel=1.0 and hence do not need to discount any
selectivities.
2014-06-10 12:25:16 +02:00
Sergey Petrunya
71df035551 MDEV-6308: Server crashes in table_multi_eq_cond_selectivity with ...
- In table_cond_selectivity(), reset keyuse variable between the loops.
2014-06-07 19:00:26 +02:00
Sergey Petrunya
504068b093 MDEV-6209: Assertion `join->best_read < double(1.79769313486231570815e+308L ...
- Use floating-point division in selectivity calculations.
2014-05-05 13:24:54 +03:00
Sergey Petrunya
54265c5f50 MDEV-5980: EITS: if condition is used for REF access, its selectivity is still in filtered%
- Testcase. The bug is fixed by commit for MDEV-6003
2014-04-25 19:12:06 +04:00
Sergey Petrunya
2acd81af73 MDEV-6003: EITS: ref access, keypart2=const vs keypart2=expr - inconsistent filtered% value
- Fix table_cond_selectivity() to work correctly for ref access 
  and "keypart2=const" case.
2014-04-25 19:04:54 +04:00
Sergey Petrunya
182f7d76ee Revert these two changes (wrong push) :
MDEV-5980: EITS: if condition is used for REF access, its selectivity is still in filtered%
MDEV-5985: EITS: selectivity estimates look illogical for join and non-key equalities
MDEV-6003: EITS: ref access, keypart2=const vs keypart2=expr - inconsistent filtered% value
- Made a number of fixes in table_cond_selectivity() so that it returns
  correct selectivity estimates.
- Added comments in related code.
Better comments
2014-04-28 21:49:39 +04:00
Sergey Petrunya
deb26989e9 MDEV-5980: EITS: if condition is used for REF access, its selectivity is still in filtered%
MDEV-5985: EITS: selectivity estimates look illogical for join and non-key equalities
MDEV-6003: EITS: ref access, keypart2=const vs keypart2=expr - inconsistent filtered% value
- Made a number of fixes in table_cond_selectivity() so that it returns
  correct selectivity estimates.
- Added comments in related code.
2014-04-21 15:37:55 +04:00
Sergey Petrunya
26a3d567c9 MDEV-5992: EITS: Selectivity of non-indexed condition is counted twice in table's fanout
MDEV-5984: EITS: Incorrect filtered% value for single-table select with range access
- Fix calculate_cond_selectivity_for_table() to work correctly with range accesses 
  over multi-component keys:
  = First, take selectivity of all possible range scans into account. Remember which 
    fields were used bt the range scans.
  = Then, calculate selectivity produced by sargable predicates on fields. If a 
    field was used in a possible range access, assume its selectivity is already
    taken into account.
- Fix table_cond_selectivity(): when quick select is used, selectivity of
  COND(table) is taken into account in matching_candidates_in_table(). In
  table_cond_selectivity() we should not apply it for the second time.
2014-04-01 09:59:51 -07:00
Sergey Petrunya
92e49bb066 MDEV-4360: ANALYZE shows "Table is already up to date" while updating stats
- Show a line with "Engine-independent statistics collected" when ANALYZE command
  caused EITS statistics to be recollected.
2014-03-28 00:32:53 +04:00
Sergey Petrunya
79a8a6130b Code cleanup:
- Move [some] engine-agnostic tests from t/selectivity.test to t/selectivity_no_engine.test
- Move Histogram::point_selectivity to sql_statistics.cc
2014-03-27 13:08:00 +04:00