Details
-
Task
-
Status: Closed (View Workflow)
-
Major
-
Resolution: Fixed
-
None
-
None
-
None
Description
Find selectivity of conditions by reading N first rows of its table.
Function accept as arguments number of rows to read, a reference to the table and list of structures with reference to the Item which selectivity will be calculated and counter of fields which satisfy the condition. The function return number or really read rows or 0 in case of error.
struct st_cond_statistic
{
Item *cond;
ulong positive;
};
typedef struct st_cond_statistic COND_STATISTIC;
ulong check_selectivity(THD *thd,
ulong rows_to_read,
TABLE *table,
List<COND_STATISTIC> *conds);
Attachments
Issue Links
- is part of
-
MDEV-4345 Fix table selectivity by sampling some probably very selective predicates
- Closed