{
"query_block": {
"select_id": 1,
"nested_loop": [
{
"table": {
"table_name": "companies",
"access_type": "const",
"possible_keys": ["PRIMARY"],
"key": "PRIMARY",
"key_length": "4",
"used_key_parts": ["company_id"],
"ref": ["const"],
"rows": 1,
"filtered": 100
}
},
{
"table": {
"table_name": "products",
"access_type": "index_merge",
"possible_keys": ["status", "idx_parent_product_id"],
"key_length": "4,3",
"index_merge": {
"intersect": [
{
"range": {
"key": "idx_parent_product_id",
"used_key_parts": ["parent_product_id"]
}
},
{
"range": {
"key": "status",
"used_key_parts": ["status"]
}
}
]
},
"rows": 4670,
"filtered": 100,
"attached_condition": "products.parent_product_id = 0 and products.company_id = 799 and (products.amount > 0 or products.tracking = 'D') and products.`status` = 'A' and (products.usergroup_ids = '' or find_in_set(0,products.usergroup_ids) or find_in_set(1,products.usergroup_ids))"
}
}
]
}
}
company_id | products_count |
---|---|
799 | 9 |