Query time 0.00204
JSON explain
{
"query_block": {
"select_id": 1,
"cost_info": {
"query_cost": "41.47"
},
"ordering_operation": {
"using_filesort": true,
"grouping_operation": {
"using_temporary_table": true,
"using_filesort": false,
"nested_loop": [
{
"table": {
"table_name": "companies",
"access_type": "ALL",
"possible_keys": [
"PRIMARY"
],
"rows_examined_per_scan": 9,
"rows_produced_per_join": 1,
"filtered": "11.11",
"cost_info": {
"read_cost": "1.05",
"eval_cost": "0.10",
"prefix_cost": "1.15",
"data_read_per_join": "6K"
},
"used_columns": [
"company_id",
"status",
"company"
],
"attached_condition": "(`aomnia_com`.`companies`.`status` = 'A')"
}
},
{
"table": {
"table_name": "cscart_categories",
"access_type": "range",
"possible_keys": [
"PRIMARY",
"c_status",
"p_category_id"
],
"key": "PRIMARY",
"used_key_parts": [
"category_id"
],
"key_length": "3",
"rows_examined_per_scan": 47,
"rows_produced_per_join": 1,
"filtered": "4.00",
"using_join_buffer": "hash join",
"cost_info": {
"read_cost": "21.00",
"eval_cost": "0.19",
"prefix_cost": "22.34",
"data_read_per_join": "4K"
},
"used_columns": [
"category_id",
"storefront_id",
"usergroup_ids",
"status"
],
"attached_condition": "((`aomnia_com`.`cscart_categories`.`category_id` in (1025,1037,1038,1039,1040,1041,1042,1043,1044,1045,1046,1047,1048,1049,1050,1051,1052,1053,1054,1055,1056,1057,1058,1059,1060,1061,1062,1063,1064,1132,271,1026,1027,1028,1029,1030,1031,1032,1033,1034,1035,1036,304,350,351,353,356)) and ((`aomnia_com`.`cscart_categories`.`usergroup_ids` = '') or (0 <> find_in_set(0,`aomnia_com`.`cscart_categories`.`usergroup_ids`)) or (0 <> find_in_set(1,`aomnia_com`.`cscart_categories`.`usergroup_ids`))) and (`aomnia_com`.`cscart_categories`.`status` in ('A','H')) and (`aomnia_com`.`cscart_categories`.`storefront_id` in (0,1)))"
}
},
{
"table": {
"table_name": "products_categories",
"access_type": "ref",
"possible_keys": [
"PRIMARY",
"pt"
],
"key": "PRIMARY",
"used_key_parts": [
"category_id"
],
"key_length": "3",
"ref": [
"aomnia_com.cscart_categories.category_id"
],
"rows_examined_per_scan": 20,
"rows_produced_per_join": 38,
"filtered": "100.00",
"using_index": true,
"cost_info": {
"read_cost": "0.48",
"eval_cost": "3.84",
"prefix_cost": "26.67",
"data_read_per_join": "615"
},
"used_columns": [
"product_id",
"category_id"
]
}
},
{
"table": {
"table_name": "products",
"access_type": "eq_ref",
"possible_keys": [
"PRIMARY",
"age_verification",
"status",
"idx_parent_product_id"
],
"key": "PRIMARY",
"used_key_parts": [
"product_id"
],
"key_length": "3",
"ref": [
"aomnia_com.products_categories.product_id"
],
"rows_examined_per_scan": 1,
"rows_produced_per_join": 1,
"filtered": "5.00",
"cost_info": {
"read_cost": "9.61",
"eval_cost": "0.19",
"prefix_cost": "40.12",
"data_read_per_join": "8K"
},
"used_columns": [
"product_id",
"product_type",
"status",
"company_id",
"amount",
"usergroup_ids",
"tracking",
"parent_product_id"
],
"attached_condition": "((`aomnia_com`.`products`.`company_id` = `aomnia_com`.`companies`.`company_id`) and (`aomnia_com`.`products`.`parent_product_id` = 0) and ((`aomnia_com`.`products`.`amount` > 0) or (`aomnia_com`.`products`.`tracking` = 'D')) and ((`aomnia_com`.`products`.`usergroup_ids` = '') or (0 <> find_in_set(0,`aomnia_com`.`products`.`usergroup_ids`)) or (0 <> find_in_set(1,`aomnia_com`.`products`.`usergroup_ids`))) and (`aomnia_com`.`products`.`status` = 'A') and (`aomnia_com`.`products`.`product_type` <> 'T') and (`aomnia_com`.`products`.`product_type` <> 'D'))"
}
},
{
"table": {
"table_name": "prices",
"access_type": "ref",
"possible_keys": [
"usergroup",
"product_id",
"lower_limit",
"usergroup_id"
],
"key": "lower_limit",
"used_key_parts": [
"lower_limit",
"product_id"
],
"key_length": "6",
"ref": [
"const",
"aomnia_com.products_categories.product_id"
],
"rows_examined_per_scan": 1,
"rows_produced_per_join": 1,
"filtered": "100.00",
"using_index": true,
"cost_info": {
"read_cost": "0.48",
"eval_cost": "0.19",
"prefix_cost": "40.79",
"data_read_per_join": "46"
},
"used_columns": [
"product_id",
"lower_limit",
"usergroup_id"
],
"attached_condition": "(`aomnia_com`.`prices`.`usergroup_id` in (0,0,1))"
}
},
{
"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": [
"aomnia_com.products_categories.product_id",
"const"
],
"rows_examined_per_scan": 1,
"rows_produced_per_join": 1,
"filtered": "100.00",
"cost_info": {
"read_cost": "0.48",
"eval_cost": "0.19",
"prefix_cost": "41.47",
"data_read_per_join": "8K"
},
"used_columns": [
"product_id",
"lang_code",
"product"
]
}
}
]
}
}
}
}
Result
| product_id |
product |
company_name |
product_type |
parent_product_id |
| 550 |
Alibi Witness 4-Channel NVR |
i.T Consultants Inc |
P |
0 |
| 3163 |
Dual Lens Solar Camera |
i.T Consultants Inc |
P |
0 |
| 3165 |
EVERSECU 1080P Ik10 Vandal proof HD Analog Metal Dome Security Camera |
i.T Consultants Inc |
P |
0 |
| 2506 |
Hiseeu 2Pcs Wireless Security Camera 5G/2.4G WiFi Camera Dual Lens PTZ Camera Outdoor Motion Tracking Color Night Version, Plug-in Cable, No-Monthly Fees Works with Wireless Camera System |
i.T Consultants Inc |
P |
0 |
| 2508 |
Hiseeu Indoor Security Camera |
i.T Consultants Inc |
P |
0 |
| 2503 |
Hiseeu Light Bulb Security Camera Wireless WiFi 5G&2.4GHz,10X Zoom PTZ Light Socket Security Camera for Home, 2-Way-Audio, Auto Tracking & Alarm, 3MP Color Night Vision, SD & Cloud Storage (Dual Lens) |
i.T Consultants Inc |
P |
0 |
| 2507 |
Hiseeu Solar Security Camera, Wireless WiFi Outdoor |
i.T Consultants Inc |
P |
0 |