Query time 0.00056
JSON explain
{
"query_block": {
"select_id": 1,
"cost_info": {
"query_cost": "16.50"
},
"nested_loop": [
{
"table": {
"table_name": "cscart_products_categories",
"access_type": "ref",
"possible_keys": [
"PRIMARY",
"pt",
"idx_pc_product_id_type"
],
"key": "PRIMARY",
"used_key_parts": [
"category_id"
],
"key_length": "3",
"ref": [
"const"
],
"rows_examined_per_scan": 36,
"rows_produced_per_join": 36,
"filtered": "100.00",
"using_index": true,
"cost_info": {
"read_cost": "0.30",
"eval_cost": "3.60",
"prefix_cost": "3.90",
"data_read_per_join": "576"
},
"used_columns": [
"product_id",
"category_id"
],
"attached_condition": "(`dev2`.`cscart_products_categories`.`product_id` is not null)"
}
},
{
"table": {
"table_name": "cscart_products",
"access_type": "eq_ref",
"possible_keys": [
"PRIMARY",
"status",
"cscart_products_product_id_index",
"idx_status"
],
"key": "PRIMARY",
"used_key_parts": [
"product_id"
],
"key_length": "3",
"ref": [
"dev2.cscart_products_categories.product_id"
],
"rows_examined_per_scan": 1,
"rows_produced_per_join": 2,
"filtered": "7.22",
"cost_info": {
"read_cost": "9.00",
"eval_cost": "0.26",
"prefix_cost": "16.50",
"data_read_per_join": "19K"
},
"used_columns": [
"product_id",
"status",
"company_id"
],
"attached_condition": "((`dev2`.`cscart_products`.`company_id` = 692) and (`dev2`.`cscart_products`.`status` = 'A'))"
}
}
]
}
}
Result
product_id |
28909 |
28911 |
28913 |
28915 |
28921 |
28923 |