Query time 0.00090
JSON explain
{
"query_block": {
"select_id": 1,
"cost_info": {
"query_cost": "107.04"
},
"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": 237,
"rows_produced_per_join": 237,
"filtered": "100.00",
"using_index": true,
"cost_info": {
"read_cost": "0.39",
"eval_cost": "23.70",
"prefix_cost": "24.09",
"data_read_per_join": "3K"
},
"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": 17,
"filtered": "7.22",
"cost_info": {
"read_cost": "59.25",
"eval_cost": "1.71",
"prefix_cost": "107.04",
"data_read_per_join": "129K"
},
"used_columns": [
"product_id",
"status",
"company_id"
],
"attached_condition": "((`dev2`.`cscart_products`.`company_id` = 687) and (`dev2`.`cscart_products`.`status` = 'A'))"
}
}
]
}
}
Result
product_id |
28608 |
28610 |
28612 |
28620 |
28638 |