From 9f3ab2f3cca6504daaa0fc75e246de31aef3fbcd Mon Sep 17 00:00:00 2001 From: tanujnay112 Date: Fri, 10 Dec 2021 13:56:52 -0800 Subject: [PATCH] [docs] Clean up and simplify wording in yb_hash_code doc (#10813) --- docs/content/latest/api/ysql/exprs/func_yb_hash_code.md | 2 +- docs/content/stable/api/ysql/exprs/func_yb_hash_code.md | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/content/latest/api/ysql/exprs/func_yb_hash_code.md b/docs/content/latest/api/ysql/exprs/func_yb_hash_code.md index 1ed56ca7fefc..06801d74e390 100644 --- a/docs/content/latest/api/ysql/exprs/func_yb_hash_code.md +++ b/docs/content/latest/api/ysql/exprs/func_yb_hash_code.md @@ -133,7 +133,7 @@ EXPLAIN ANALYZE SELECT * FROM sample_table WHERE yb_hash_code(x,z) <= 128 and yb (6 rows) ``` -In this example, only the first clause is pushed down to an index, `sample_idx`. The rest are filters executed at the YSQL level. The reason why the optimizer chose this particular filter to push down is that it has the lowest selectivity as determined by the low number of hash values it filters for compared to the `yb_hash_code(x,y) >= 5` filter. +In this example, only the first clause is pushed down to an index, `sample_idx`. The rest are filters executed at the YSQL level. The optimizer prefers to push down this particular filter because it selects the fewest rows as determined by the low number of hash values it filters for compared to the `yb_hash_code(x,y) >= 5` filter. ## Use Case Examples diff --git a/docs/content/stable/api/ysql/exprs/func_yb_hash_code.md b/docs/content/stable/api/ysql/exprs/func_yb_hash_code.md index efcf9bca6635..80b18eca4571 100644 --- a/docs/content/stable/api/ysql/exprs/func_yb_hash_code.md +++ b/docs/content/stable/api/ysql/exprs/func_yb_hash_code.md @@ -131,7 +131,7 @@ EXPLAIN ANALYZE SELECT * FROM sample_table WHERE yb_hash_code(x,z) <= 128 and yb (6 rows) ``` -In this example, only the first clause is pushed down to an index, `sample_idx`. The rest are filters executed at the YSQL level. The reason why the optimizer chose this particular filter to push down is that it has the lowest selectivity as determined by the low number of hash values it filters for compared to the `yb_hash_code(x,y) >= 5` filter. +In this example, only the first clause is pushed down to an index, `sample_idx`. The rest are filters executed at the YSQL level. The optimizer prefers to push down this particular filter because it selects the fewest rows as determined by the low number of hash values it filters for compared to the `yb_hash_code(x,y) >= 5` filter. ## Use Case Examples