Skip to content

bug: explain is not right after enable_distributed_eval_index enabled #8049

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

Closed
Tracked by #7823
BohuTANG opened this issue Oct 8, 2022 · 1 comment · Fixed by #8799
Closed
Tracked by #7823

bug: explain is not right after enable_distributed_eval_index enabled #8049

BohuTANG opened this issue Oct 8, 2022 · 1 comment · Fixed by #8799
Assignees
Labels
C-bug Category: something isn't working

Comments

@BohuTANG
Copy link
Member

BohuTANG commented Oct 8, 2022

Summary

table: db7861.t7861 (this table segment numbers same as block numbers):

mysql> select * from fuse_snapshot('db7861', 't7861') limit 1\G;
*************************** 1. row ***************************
         snapshot_id: d655707aba6e43af9d13d2e7ed0774ed
   snapshot_location: 112/151214/_ss/d655707aba6e43af9d13d2e7ed0774ed_v1.json
      format_version: 1
previous_snapshot_id: 7c18aa03089940d4800deb45e91f29cb
       segment_count: 21856
         block_count: 21856
           row_count: 170750000
  bytes_uncompressed: 212278377285
    bytes_compressed: 66885815033
          index_size: 164959939
           timestamp: 2022-10-08 07:50:02.222926

enable_distributed_eval_index=1(default)

mysql> explain select * from db7861.t7861 where c24='0.10437281852861613';
+-------------------------------------------------------------------------------+
| explain                                                                       |
+-------------------------------------------------------------------------------+
| TableScan                                                                     |
| ├── table: default.db7861.t7861                                               |
| ├── read rows: 170750000                                                      |
| ├── read bytes: 66885815033                                                   |
| ├── partitions total: 21856  -- this is the segments number  (this is not right)       
| ├── partitions scanned: 21856     -- this is the segments number  (this is not right)                               
| └── push downs: [filters: [(c24 = '0.10437281852861613')], limit: NONE]       |
+-------------------------------------------------------------------------------+

enable_distributed_eval_index=0

mysql> set enable_distributed_eval_index=0;
Query OK, 0 rows affected (0.01 sec)

mysql> explain select * from db7861.t7861 where c24='0.10437281852861613';
+-------------------------------------------------------------------------------+
| explain                                                                       |
+-------------------------------------------------------------------------------+
| TableScan                                                                     |
| ├── table: default.db7861.t7861                                               |
| ├── read rows: 5323985                                                        |
| ├── read bytes: 2083488768                                                    |
| ├── partitions total: 21856            -- this is block number(it's ok)
| ├── partitions scanned: 683          -- this is block number after pruned (it's ok)
| └── push downs: [filters: [(c24 = '0.10437281852861613')], limit: NONE]       |
+-------------------------------------------------------------------------------+
@BohuTANG BohuTANG added the C-bug Category: something isn't working label Oct 8, 2022
@BohuTANG
Copy link
Member Author

BohuTANG commented Oct 8, 2022

We should back the explain to blocks for partitions not segments, cc @zhang2014

@BohuTANG BohuTANG changed the title explain is not right after enable_distributed_eval_index enabled bug: explain is not right after enable_distributed_eval_index enabled Oct 8, 2022
@zhang2014 zhang2014 self-assigned this Oct 9, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C-bug Category: something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants