Query time 0.00045
JSON explain
{
"query_block": {
"select_id": 1,
"cost_info": {
"query_cost": "16.95"
},
"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": 37,
"rows_produced_per_join": 37,
"filtered": "100.00",
"using_index": true,
"cost_info": {
"read_cost": "0.30",
"eval_cost": "3.70",
"prefix_cost": "4.00",
"data_read_per_join": "592"
},
"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.25",
"eval_cost": "0.27",
"prefix_cost": "16.95",
"data_read_per_join": "20K"
},
"used_columns": [
"product_id",
"status",
"company_id"
],
"attached_condition": "((`dev2`.`cscart_products`.`company_id` = 687) and (`dev2`.`cscart_products`.`status` = 'A'))"
}
}
]
}
}