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

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

    XMLWordPrintable

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

        1. diff
          3 kB
          Oleksandr Byelkin

        Issue Links

          Activity

            People

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

              Dates

                Created:
                Updated:
                Resolved:

                Git Integration

                  Error rendering 'com.xiplink.jira.git.jira_git_plugin:git-issue-webpanel'. Please contact your Jira administrators.