XiaoMi / soar

SQL Optimizer And Rewriter
Apache License 2.0
8.67k stars 1.32k forks source link

edit DuplicatesRemoval #268

Closed wangqifan closed 3 years ago

wangqifan commented 3 years ago

DuplicatesRemoval 格式问题

使用的数据 test_db https://github.com/datacharmer/test_db.git sql 语句 select DISTINCT(first_name) FROM employees.employees;

explain json { "query_block": { "select_id": 1, "cost_info": { "query_cost": "30857.78" }, "duplicates_removal": { "using_temporary_table": true, "using_filesort": false, "table": { "table_name": "employees", "access_type": "ALL", "rows_examined_per_scan": 299335, "rows_produced_per_join": 299335, "filtered": "100.00", "cost_info": { "read_cost": "924.28", "eval_cost": "29933.50", "prefix_cost": "30857.78", "data_read_per_join": "38M" }, "used_columns": [ "emp_no", "first_name" ] } } } }