Query time 0.00823
JSON explain
{
"query_block": {
"select_id": 1,
"cost_info": {
"query_cost": "432.74"
},
"ordering_operation": {
"using_filesort": true,
"grouping_operation": {
"using_temporary_table": true,
"using_filesort": false,
"nested_loop": [
{
"table": {
"table_name": "products_categories",
"access_type": "range",
"possible_keys": [
"PRIMARY",
"pt"
],
"key": "PRIMARY",
"used_key_parts": [
"category_id"
],
"key_length": "3",
"rows_examined_per_scan": 458,
"rows_produced_per_join": 458,
"filtered": "100.00",
"using_index": true,
"cost_info": {
"read_cost": "48.92",
"eval_cost": "45.80",
"prefix_cost": "94.72",
"data_read_per_join": "7K"
},
"used_columns": [
"product_id",
"category_id"
],
"attached_condition": "(`dbggbern`.`products_categories`.`category_id` in (59,110,111,112,113,114,115,116,117,118,158,222,225,254,274,296,297,341,368,414,456,496,498,563,610,633,643))"
}
},
{
"table": {
"table_name": "cscart_categories",
"access_type": "eq_ref",
"possible_keys": [
"PRIMARY",
"c_status",
"p_category_id"
],
"key": "PRIMARY",
"used_key_parts": [
"category_id"
],
"key_length": "3",
"ref": [
"dbggbern.products_categories.category_id"
],
"rows_examined_per_scan": 1,
"rows_produced_per_join": 458,
"filtered": "100.00",
"cost_info": {
"read_cost": "114.50",
"eval_cost": "45.80",
"prefix_cost": "255.02",
"data_read_per_join": "1M"
},
"used_columns": [
"category_id",
"usergroup_ids"
],
"attached_condition": "((`dbggbern`.`cscart_categories`.`usergroup_ids` = '') or (0 <> find_in_set(0,`dbggbern`.`cscart_categories`.`usergroup_ids`)) or (0 <> find_in_set(1,`dbggbern`.`cscart_categories`.`usergroup_ids`)))"
}
},
{
"table": {
"table_name": "products",
"access_type": "eq_ref",
"possible_keys": [
"PRIMARY",
"status",
"idx_parent_product_id"
],
"key": "PRIMARY",
"used_key_parts": [
"product_id"
],
"key_length": "3",
"ref": [
"dbggbern.products_categories.product_id"
],
"rows_examined_per_scan": 1,
"rows_produced_per_join": 49,
"filtered": "10.87",
"cost_info": {
"read_cost": "114.50",
"eval_cost": "4.98",
"prefix_cost": "415.32",
"data_read_per_join": "253K"
},
"used_columns": [
"product_id",
"product_type",
"status",
"usergroup_ids",
"parent_product_id",
"pos_availabilty"
],
"attached_condition": "((`dbggbern`.`products`.`parent_product_id` = 0) and (`dbggbern`.`products`.`pos_availabilty` in ('S','N')) and ((`dbggbern`.`products`.`usergroup_ids` = '') or (0 <> find_in_set(0,`dbggbern`.`products`.`usergroup_ids`)) or (0 <> find_in_set(1,`dbggbern`.`products`.`usergroup_ids`))) and (`dbggbern`.`products`.`status` = 'A'))"
}
},
{
"table": {
"table_name": "descr1",
"access_type": "eq_ref",
"possible_keys": [
"PRIMARY",
"product_id"
],
"key": "PRIMARY",
"used_key_parts": [
"product_id",
"lang_code"
],
"key_length": "9",
"ref": [
"dbggbern.products_categories.product_id",
"const"
],
"rows_examined_per_scan": 1,
"rows_produced_per_join": 49,
"filtered": "100.00",
"cost_info": {
"read_cost": "12.44",
"eval_cost": "4.98",
"prefix_cost": "432.74",
"data_read_per_join": "190K"
},
"used_columns": [
"product_id",
"lang_code",
"product"
]
}
}
]
}
}
}
}
Result
| product_id |
product_type |
parent_product_id |
| 5465 |
P |
0 |
| 6696 |
P |
0 |
| 6723 |
P |
0 |
| 6725 |
P |
0 |