Uploaded image for project: 'MariaDB Server'
  1. MariaDB Server
  2. MDEV-4343

Find selectivity of conditions by reading N first rows of its table

    Details

    • Type: Task
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Fix Version/s: None
    • Component/s: None
    • Labels:
      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);

        Gliffy Diagrams

          Attachments

            Issue Links

              Activity

              Hide
              sanja Oleksandr Byelkin added a comment -

              First version of the function

              Show
              sanja Oleksandr Byelkin added a comment - First version of the function

                People

                • Assignee:
                  sanja Oleksandr Byelkin
                  Reporter:
                  sanja Oleksandr Byelkin
                • Votes:
                  0 Vote for this issue
                  Watchers:
                  2 Start watching this issue

                  Dates

                  • Created:
                    Updated:
                    Resolved: