Commit graph

12 commits

Author SHA1 Message Date
Igor Babaev
b12b3cae85 Added comments.
Renamed the virtual method middle_point_pos for the class Field to
pos_in_interval.
2013-04-15 22:43:07 -07:00
Igor Babaev
b53bf231cc Fixed compiler complains. 2013-04-13 02:36:30 -07:00
Igor Babaev
e3bf08d4b1 Fixed bug mdev-4363.
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.
2013-04-06 17:18:51 -07:00
Igor Babaev
daaa5834c9 Fixed bug mdev-4370.
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.
2013-04-05 11:24:28 -07:00
Igor Babaev
d62ee4e970 Fixed bug mdev-4350.
Wrong formulas used by the function Histogram::point_selectivity()
could result in a negative value of selectivity returned by the
function.
2013-04-03 20:00:10 -07:00
Igor Babaev
9e1ca1053b Added the type of histogram for mwl #253.
Introduced double precision height-balanced histograms.
2013-03-30 18:57:07 -07:00
Igor Babaev
1009832c13 Added histogams for table columns. 2013-03-25 23:48:29 -07:00
Igor Babaev
fc1c8ffdad The pilot patch for mwl#253. 2013-03-11 07:44:24 -07:00
Igor Babaev
01dca17a9c Fixed bug mdev-3979.
Made allocation of memory for statistical data in a table share to be thread safe.
This memory is now allocated in a special MEM_ROOT that is created for each
table share.
2013-01-08 08:17:51 -08:00
Igor Babaev
a06224bd15 Addressed all remaining issues from the review of the patch
that introduced engine independent persistent statistics.
In particular:
- added an enumeration type for possible values of the system
  variable use_stat_tables
- renamed KEY::real_rec_per_key to KEY::actual_rec_per_key
- optimized the collection of statistical data for any primary
  key defined only on one column.
2012-12-13 23:05:12 -08:00
Igor Babaev
8c499274da Performed re-factoring and re-structuring of the code for mwl#248:
- Moved the definitions of the classes to store data from persistent
    statistical tables into statistics.h, leaving in other internal 
    data structures only references to the corresponding objects.
  - Defined class Column_statistics_collected derived from the class
    Column_statistics. This is a helper class to collect statistics
    on columns.
  - Moved references to read statistics to TABLE SHARE, leaving the
    the reference to the collected statistics in TABLE.
 - Added a new clone method for the class Field allowing to clone
    fields attached to table shares. It was was used to create 
    fields for min/max values in the memory of the table share.
A lso:
  - Added procedures to allocate memory for statistical data in
    the table share memory and in table memory.
Also: 
  - Added a test case demonstrating how ANALYZE could work in parallel
    to collect statistics on different indexes of the same table.
  - Added a test two demonstrate how two connections working 
    simultaneously could allocate memory for statistical data in the 
    table share memory.
2012-07-26 17:50:08 -07:00
Igor Babaev
e8497370b9 The main patch for the MWL#248 back-ported from
lp:~igorb-seattle/mysql-server/mysql-azalea-wl4777.
2012-01-04 17:51:53 -08:00