{
"query_block": {
"select_id": 1,
"ordering_operation": {
"using_filesort": true,
"nested_loop": [
{
"table": {
"table_name": "pc",
"access_type": "ref",
"possible_keys": [
"PRIMARY",
"pt"
],
"key": "pt",
"used_key_parts": [
"product_id"
],
"key_length": "3",
"ref": [
"const"
],
"rows": 2,
"filtered": 100,
"attached_condition": "((`_testcscart`.`pc`.`product_id` <=> 4) and (`_testcscart`.`pc`.`category_id` is not null))"
}
},
{
"table": {
"table_name": "c",
"access_type": "eq_ref",
"possible_keys": [
"PRIMARY",
"p_category_id"
],
"key": "PRIMARY",
"used_key_parts": [
"category_id"
],
"key_length": "3",
"ref": [
"_testcscart.pc.category_id"
],
"rows": 1,
"filtered": 100,
"attached_condition": "(`_testcscart`.`c`.`company_id` = 1)"
}
}
]
}
}
}
| category_id | is_main |
|---|---|
| 3 | 1 |
| 1 | 0 |