Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- {
- "steps": [
- {
- "join_preparation": {
- "select#": 1,
- "steps": [
- {
- "expanded_query": "/* select#1 */ select `v2_thing`.`id` AS `ID` from `v2_thing` where ((`v2_thing`.`demo` = 'N') and (`v2_thing`.`created_datetime` > (now() - interval 50 day)) and (`v2_thing`.`status` = 'C'))"
- }
- ]
- }
- },
- {
- "join_optimization": {
- "select#": 1,
- "steps": [
- {
- "condition_processing": {
- "condition": "WHERE",
- "original_condition": "((`v2_thing`.`demo` = 'N') and (`v2_thing`.`created_datetime` > (now() - interval 50 day)) and (`v2_thing`.`status` = 'C'))",
- "steps": [
- {
- "transformation": "equality_propagation",
- "resulting_condition": "((`v2_thing`.`demo` = 'N') and (`v2_thing`.`created_datetime` > (now() - interval 50 day)) and (`v2_thing`.`status` = 'C'))"
- },
- {
- "transformation": "constant_propagation",
- "resulting_condition": "((`v2_thing`.`demo` = 'N') and (`v2_thing`.`created_datetime` > (now() - interval 50 day)) and (`v2_thing`.`status` = 'C'))"
- },
- {
- "transformation": "trivial_condition_removal",
- "resulting_condition": "((`v2_thing`.`demo` = 'N') and (`v2_thing`.`created_datetime` > (now() - interval 50 day)) and (`v2_thing`.`status` = 'C'))"
- }
- ]
- }
- },
- {
- "substitute_generated_columns": {
- }
- },
- {
- "table_dependencies": [
- {
- "table": "`v2_thing`",
- "row_may_be_null": false,
- "map_bit": 0,
- "depends_on_map_bits": [
- ]
- }
- ]
- },
- {
- "ref_optimizer_key_uses": [
- {
- "table": "`v2_thing`",
- "field": "status",
- "equals": "'C'",
- "null_rejecting": false
- }
- ]
- },
- {
- "rows_estimation": [
- {
- "table": "`v2_thing`",
- "range_analysis": {
- "table_scan": {
- "rows": 79054472,
- "cost": 1.69e7
- },
- "potential_range_indexes": [
- {
- "index": "PRIMARY",
- "usable": false,
- "cause": "not_applicable"
- },
- {
- "index": "idx_status_thing",
- "usable": true,
- "key_parts": [
- "status",
- "id"
- ]
- },
- {
- "index": "idx_created_datetime_thing",
- "usable": true,
- "key_parts": [
- "created_datetime",
- "id"
- ]
- },
- {
- "index": "idx_clientid_thing",
- "usable": false,
- "cause": "not_applicable"
- },
- {
- "index": "idx_external_reference_thing",
- "usable": false,
- "cause": "not_applicable"
- },
- {
- "index": "idx_person_contact_type_thing",
- "usable": false,
- "cause": "not_applicable"
- },
- {
- "index": "fk_buyer_thing",
- "usable": false,
- "cause": "not_applicable"
- },
- {
- "index": "v2_thing_owner_user_id_index",
- "usable": false,
- "cause": "not_applicable"
- }
- ],
- "setup_range_conditions": [
- ],
- "group_index_range": {
- "chosen": false,
- "cause": "not_group_by_or_distinct"
- },
- "analyzing_range_alternatives": {
- "range_scan_alternatives": [
- {
- "index": "idx_status_thing",
- "ranges": [
- "C <= status <= C"
- ],
- "index_dives_for_eq_ranges": true,
- "rowid_ordered": true,
- "using_mrr": false,
- "index_only": false,
- "rows": 39527236,
- "cost": 4.74e7,
- "chosen": false,
- "cause": "cost"
- },
- {
- "index": "idx_created_datetime_thing",
- "ranges": [
- "0x999ef970bb < created_datetime"
- ],
- "index_dives_for_eq_ranges": true,
- "rowid_ordered": false,
- "using_mrr": false,
- "index_only": false,
- "rows": 10072076,
- "cost": 1.21e7,
- "chosen": true
- }
- ],
- "analyzing_roworder_intersect": {
- "usable": false,
- "cause": "too_few_roworder_scans"
- }
- },
- "chosen_range_access_summary": {
- "range_access_plan": {
- "type": "range_scan",
- "index": "idx_created_datetime_thing",
- "rows": 10072076,
- "ranges": [
- "0x999ef970bb < created_datetime"
- ]
- },
- "rows_for_plan": 10072076,
- "cost_for_plan": 1.21e7,
- "chosen": true
- }
- }
- }
- ]
- },
- {
- "considered_execution_plans": [
- {
- "plan_prefix": [
- ],
- "table": "`v2_thing`",
- "best_access_path": {
- "considered_access_paths": [
- {
- "access_type": "ref",
- "index": "idx_status_thing",
- "rows": 3.95e7,
- "cost": 1.11e7,
- "chosen": true
- },
- {
- "rows_to_scan": 10072076,
- "access_type": "range",
- "range_details": {
- "used_index": "idx_created_datetime_thing"
- },
- "resulting_rows": 503604,
- "cost": 1.41e7,
- "chosen": false
- }
- ]
- },
- "condition_filtering_pct": 1.2741,
- "rows_for_plan": 503604,
- "cost_for_plan": 1.11e7,
- "chosen": true
- }
- ]
- },
- {
- "attaching_conditions_to_tables": {
- "original_condition": "((`v2_thing`.`demo` = 'N') and (`v2_thing`.`created_datetime` > (now() - interval 50 day)) and (`v2_thing`.`status` = 'C'))",
- "attached_conditions_computation": [
- ],
- "attached_conditions_summary": [
- {
- "table": "`v2_thing`",
- "attached": "((`v2_thing`.`demo` = 'N') and (`v2_thing`.`created_datetime` > (now() - interval 50 day)))"
- }
- ]
- }
- },
- {
- "refine_plan": [
- {
- "table": "`v2_thing`"
- }
- ]
- }
- ]
- }
- },
- {
- "join_explain": {
- "select#": 1,
- "steps": [
- ]
- }
- }
- ]
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement