"rows_to_scan": 6,
"access_type": "scan",
"resulting_rows": 6,
"cost": 2.2,
"chosen": true
}
]
},
//因此选择了成本更低的scan
"condition_filtering_pct": 100,
"rows_for_plan": 6,
"cost_for_plan": 2.2,
"chosen": true
}
]
},
{
"attaching_conditions_to_tables": {
"original_condition": "((`staffs`.`age` = 23) and (`staffs`.`name` = 'July'))",
"attached_conditions_computation": [
],
"attached_conditions_summary": [
{
"table": "`staffs`",
"attached": "((`staffs`.`age` = 23) and (`staffs`.`name` = 'July'))"
}
]
}
},
{
"refine_plan": [
{
"table": "`staffs`"
}
]
}
]
}
},
{
"join_execution": {
"select#": 1,
"steps": [
]
}
}
]
}
增加表数据量
-- 接下来增大表的数据量
INSERT INTO `staffs` (`name`, `age`, `pos`, `add_time`)
VALUES
('July', 25, 'dev', '2018-06-04 16:30:17'),
('July', 23, 'dev1', '2018-06-04 16:02:02'),
('July', 23, 'dev2', '2018-06-04 16:02:02'),
('July', 23, 'dev3', '2018-06-04 16:02:02'),
('July', 23, 'dev4', '2018-06-04 16:02:02'),
('July', 23, 'dev6', '2018-06-04 16:02:0