Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

MDEV-18478 #2970

Open
wants to merge 3 commits into
base: 11.4
Choose a base branch
from
Open

MDEV-18478 #2970

wants to merge 3 commits into from

Conversation

spetrunia
Copy link
Member

@spetrunia spetrunia commented Dec 28, 2023

  • The Jira issue number for this PR is: MDEV-18478

Description

TODO: fill description here

How can this PR be tested?

TODO: modify the automated test suite to verify that the PR causes MariaDB to behave as intended.
Consult the documentation on "Writing good test cases".

If the changes are not amenable to automated testing, please explain why not and carefully describe how to test manually.

Basing the PR against the correct MariaDB version

  • This is a new feature and the PR is based against the latest MariaDB development branch.
  • This is a bug fix and the PR is based against the earliest maintained branch in which the bug can be reproduced.

PR quality check

  • I checked the CODING_STANDARDS.md file and my PR conforms to this where appropriate.
  • For any trivial modifications to the PR, I am ok with the reviewer making the changes themselves.

sql/ha_handler_stats.h Outdated Show resolved Hide resolved
sql/sql_explain.cc Outdated Show resolved Hide resolved
sql/sql_explain.cc Outdated Show resolved Hide resolved
sql/sql_explain.cc Outdated Show resolved Hide resolved
sql/sql_explain.cc Outdated Show resolved Hide resolved
sql/sql_explain.cc Outdated Show resolved Hide resolved
…dex condition

(Based on the original patch by Jason Cu)

Part #1:
- Add ha_handler_stats::{icp_attempts,icp_match}, make
  handler_index_cond_check() increment them.
- ANALYZE FORMAT=JSON now prints r_icp_filtered based on these counters.
…dex condition

Part#2: Make the printed r_ values in JSON output consistent. After this
patch, ANALYZE output has:

- r_index_rows (NEW) - Observed number of rows before ICP or Rowid Filtering
  checks. This is a per-scan average. like r_rows and "rows" are.

- r_rows (AS BEFORE) - Observed number of rows after ICP and Rowid Filtering.

- r_icp_filtered (NEW in MDEV-18478) - Observed selectivity of ICP condition.
- (observed selectivity of Rowid Filter is in $.rowid_filter.r_selectivity_pct)

- r_condition_filtered (NEW) - Observed selectivity of "attached_condition".
  This number was previously printed in r_filtered.

- r_filtered - Observed combined selectivity: fraction of rows left after applying
  ICP condition, Rowid Filter, and attached_condition. This is now comparable
  with "filtered".
…rage, not total

Make Explain_rowid_filter::print_explain_json() print "r_lookups" as
per-loop average, not total.

Per-loop average is comparable with parent JSON node's (that is, table's)
"rows" and "r_rows", which are per-loop averages.
@spetrunia
Copy link
Member Author

@Olernov , I believe I have addressed all of the review input.

@Olernov
Copy link
Contributor

Olernov commented Jan 4, 2024

OK, thanks! No more comments from me.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
2 participants