mysql> SELECT * FROM information_schema.optimizer_trace\G *************************** 1. row *************************** QUERY: SELECT * FROM film WHERE film_id IN (1,2,3,4,5) TRACE: { "steps": [ { "join_preparation": { "select#": 1, "steps": [ { "IN_uses_bisection": true }, { "expanded_query": "/* select#1 */ select `film`.`film_id` AS `film_id`,`film`.`title` AS `title`,`film`.`description` AS `description`,`film`.`release_year` AS `release_year`,`film`.`language_id` AS `language_id`,`film`.`original_language_id` AS `original_language_id`,`film`.`rental_duration` AS `rental_duration`,`film`.`rental_rate` AS `rental_rate`,`film`.`length` AS `length`,`film`.`replacement_cost` AS `replacement_cost`,`film`.`rating` AS `rating`,`film`.`special_features` AS `special_features`,`film`.`last_update` AS `last_update` from `film` where (`film`.`film_id` in (1,2,3,4,5))" } ] } }, { "join_optimization": { "select#": 1, "steps": [ { "condition_processing": { "condition": "WHERE", "original_condition": "(`film`.`film_id` in (1,2,3,4,5))", "steps": [ { "transformation": "equality_propagation", "resulting_condition": "(`film`.`film_id` in (1,2,3,4,5))" }, { "transformation": "constant_propagation", "resulting_condition": "(`film`.`film_id` in (1,2,3,4,5))" }, { "transformation": "trivial_condition_removal", "resulting_condition": "(`film`.`film_id` in (1,2,3,4,5))" } ] } }, { "table_dependencies": [ { "table": "`film`", "row_may_be_null": false, "map_bit": 0, "depends_on_map_bits": [ ] } ] }, { "ref_optimizer_key_uses": [ ] }, { "rows_estimation": [ { "table": "`film`", "range_analysis": { "table_scan": { "rows": 1000, "cost": 214.1 }, "potential_range_indexes": [ { "index": "PRIMARY", "usable": true, "key_parts": [ "film_id" ] }, { "index": "idx_title", "usable": false, "cause": "not_applicable" }, { "index": "idx_fk_language_id", "usable": false, "cause": "not_applicable" }, { "index": "idx_fk_original_language_id", "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": "PRIMARY", "ranges": [ "1 <= film_id <= 1", "2 <= film_id <= 2", "3 <= film_id <= 3", "4 <= film_id <= 4", "5 <= film_id <= 5" ], "index_dives_for_eq_ranges": true, "rowid_ordered": true, "using_mrr": false, "index_only": false, "rows": 5, "cost": 6.0168, "chosen": true } ], "analyzing_roworder_intersect": { "usable": false, "cause": "too_few_roworder_scans" } }, "chosen_range_access_summary": { "range_access_plan": { "type": "range_scan", "index": "PRIMARY", "rows": 5, "ranges": [ "1 <= film_id <= 1", "2 <= film_id <= 2", "3 <= film_id <= 3", "4 <= film_id <= 4", "5 <= film_id <= 5" ] }, "rows_for_plan": 5, "cost_for_plan": 6.0168, "chosen": true } } } ] }, { "considered_execution_plans": [ { "plan_prefix": [ ], "table": "`film`", "best_access_path": { "considered_access_paths": [ { "rows_to_scan": 5, "access_type": "range", "range_details": { "used_index": "PRIMARY" }, "resulting_rows": 5, "cost": 7.0168, "chosen": true } ] }, "condition_filtering_pct": 100, "rows_for_plan": 5, "cost_for_plan": 7.0168, "chosen": true } ] }, { "attaching_conditions_to_tables": { "original_condition": "(`film`.`film_id` in (1,2,3,4,5))", "attached_conditions_computation": [ ], "attached_conditions_summary": [ { "table": "`film`", "attached": "(`film`.`film_id` in (1,2,3,4,5))" } ] } }, { "refine_plan": [ { "table": "`film`" } ] } ] } }, { "join_execution": { "select#": 1, "steps": [ ] } } ] } MISSING_BYTES_BEYOND_MAX_MEM_SIZE: 0 INSUFFICIENT_PRIVILEGES: 0 1 row in set (0.00 sec) mysql>