Query time 0.00113
JSON explain
{
"query_block": {
"select_id": 1,
"cost_info": {
"query_cost": "15.88"
},
"ordering_operation": {
"using_filesort": false,
"grouping_operation": {
"using_temporary_table": true,
"using_filesort": false,
"nested_loop": [
{
"table": {
"table_name": "variation_group_products",
"access_type": "range",
"possible_keys": [
"PRIMARY",
"idx_group_id"
],
"key": "idx_group_id",
"used_key_parts": [
"group_id"
],
"key_length": "3",
"rows_examined_per_scan": 16,
"rows_produced_per_join": 16,
"filtered": "100.00",
"index_condition": "(`cscart_db`.`variation_group_products`.`group_id` in (782,783,781,527,637))",
"cost_info": {
"read_cost": "6.86",
"eval_cost": "1.60",
"prefix_cost": "8.46",
"data_read_per_join": "256"
},
"used_columns": [
"product_id",
"group_id"
]
}
},
{
"table": {
"table_name": "products",
"access_type": "eq_ref",
"possible_keys": [
"PRIMARY",
"age_verification",
"status",
"idx_parent_product_id",
"idx_master_product_id",
"youtube_link"
],
"key": "PRIMARY",
"used_key_parts": [
"product_id"
],
"key_length": "3",
"ref": [
"cscart_db.variation_group_products.product_id"
],
"rows_examined_per_scan": 1,
"rows_produced_per_join": 0,
"filtered": "5.00",
"cost_info": {
"read_cost": "4.79",
"eval_cost": "0.08",
"prefix_cost": "14.85",
"data_read_per_join": "4K"
},
"used_columns": [
"product_id",
"product_type",
"status",
"company_id",
"amount",
"usergroup_ids",
"parent_product_id",
"master_product_id",
"master_product_status",
"master_product_offers_count"
],
"attached_condition": "((`cscart_db`.`products`.`company_id` in (13,0)) and ((`cscart_db`.`products`.`usergroup_ids` = '') or (0 <> find_in_set(0,`cscart_db`.`products`.`usergroup_ids`)) or (0 <> find_in_set(1,`cscart_db`.`products`.`usergroup_ids`))) and (`cscart_db`.`products`.`status` = 'A') and (`cscart_db`.`products`.`master_product_status` = 'A'))"
}
},
{
"table": {
"table_name": "cscart_supplier_links",
"access_type": "ref",
"possible_keys": [
"object_id"
],
"key": "object_id",
"used_key_parts": [
"object_id",
"object_type"
],
"key_length": "7",
"ref": [
"cscart_db.variation_group_products.product_id",
"const"
],
"rows_examined_per_scan": 1,
"rows_produced_per_join": 0,
"filtered": "100.00",
"index_condition": "<if>(is_not_null_compl(cscart_supplier_links), (`cscart_db`.`cscart_supplier_links`.`object_id` = `cscart_db`.`variation_group_products`.`product_id`), true)",
"cost_info": {
"read_cost": "0.20",
"eval_cost": "0.08",
"prefix_cost": "15.13",
"data_read_per_join": "12"
},
"used_columns": [
"supplier_id",
"object_id",
"object_type"
]
}
},
{
"table": {
"table_name": "products_categories",
"access_type": "ref",
"possible_keys": [
"PRIMARY",
"pt"
],
"key": "pt",
"used_key_parts": [
"product_id"
],
"key_length": "3",
"ref": [
"cscart_db.variation_group_products.product_id"
],
"rows_examined_per_scan": 1,
"rows_produced_per_join": 0,
"filtered": "100.00",
"using_index": true,
"cost_info": {
"read_cost": "0.32",
"eval_cost": "0.09",
"prefix_cost": "15.53",
"data_read_per_join": "13"
},
"used_columns": [
"product_id",
"category_id"
]
}
},
{
"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": [
"cscart_db.products_categories.category_id"
],
"rows_examined_per_scan": 1,
"rows_produced_per_join": 0,
"filtered": "5.00",
"cost_info": {
"read_cost": "0.21",
"eval_cost": "0.00",
"prefix_cost": "15.84",
"data_read_per_join": "122"
},
"used_columns": [
"category_id",
"usergroup_ids",
"status",
"storefront_id"
],
"attached_condition": "(((`cscart_db`.`cscart_categories`.`usergroup_ids` = '') or (0 <> find_in_set(0,`cscart_db`.`cscart_categories`.`usergroup_ids`)) or (0 <> find_in_set(1,`cscart_db`.`cscart_categories`.`usergroup_ids`))) and (`cscart_db`.`cscart_categories`.`status` in ('A','H')) and (`cscart_db`.`cscart_categories`.`storefront_id` in (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": [
"cscart_db.variation_group_products.product_id",
"const"
],
"rows_examined_per_scan": 1,
"rows_produced_per_join": 0,
"filtered": "100.00",
"cost_info": {
"read_cost": "0.02",
"eval_cost": "0.00",
"prefix_cost": "15.86",
"data_read_per_join": "200"
},
"used_columns": [
"product_id",
"lang_code",
"product"
]
}
},
{
"table": {
"table_name": "companies",
"access_type": "eq_ref",
"possible_keys": [
"PRIMARY"
],
"key": "PRIMARY",
"used_key_parts": [
"company_id"
],
"key_length": "4",
"ref": [
"cscart_db.products.company_id"
],
"rows_examined_per_scan": 1,
"rows_produced_per_join": 0,
"filtered": "100.00",
"cost_info": {
"read_cost": "0.01",
"eval_cost": "0.00",
"prefix_cost": "15.88",
"data_read_per_join": "305"
},
"used_columns": [
"company_id",
"status",
"company"
],
"attached_condition": "<if>(found_match(companies), ((`cscart_db`.`companies`.`status` = 'A') or (`cscart_db`.`products`.`company_id` = 0)), true)"
}
}
]
}
}
}
}
Result
| product_id |
amount |
product |
company_name |
supplier_id |
variation_group_id |
product_type |
parent_product_id |
master_product_offers_count |
master_product_id |
company_id |
| 12405 |
69 |
Gramiyaa Cold Pressed Sesame Oil 1 Litre |
Roadskye Tradecom Pvt. Ltd. |
272 |
527 |
P |
0 |
0 |
0 |
13 |
| 12399 |
72 |
Gramiyaa Cold Pressed Coconut Oil 1 Litre |
Roadskye Tradecom Pvt. Ltd. |
272 |
527 |
P |
0 |
0 |
0 |
13 |
| 12400 |
84 |
Gramiyaa Cold Pressed Coconut Oil 2 Litre |
Roadskye Tradecom Pvt. Ltd. |
272 |
527 |
P |
0 |
0 |
0 |
13 |
| 12401 |
95 |
Gramiyaa Cold Pressed Coconut Oil 4 Litre |
Roadskye Tradecom Pvt. Ltd. |
272 |
527 |
P |
0 |
0 |
0 |
13 |
| 12402 |
66 |
Gramiyaa Cold Pressed Groundnut Oil 1 Litre |
Roadskye Tradecom Pvt. Ltd. |
272 |
527 |
P |
0 |
0 |
0 |
13 |
| 12403 |
70 |
Gramiyaa Cold Pressed Groundnut Oil 2 Litre |
Roadskye Tradecom Pvt. Ltd. |
272 |
527 |
P |
0 |
0 |
0 |
13 |
| 12404 |
61 |
Gramiyaa Cold Pressed Groundnut Oil 4 Litre |
Roadskye Tradecom Pvt. Ltd. |
272 |
527 |
P |
0 |
0 |
0 |
13 |
| 12406 |
93 |
Gramiyaa Cold Pressed Sesame Oil 2 Litre |
Roadskye Tradecom Pvt. Ltd. |
272 |
527 |
P |
0 |
0 |
0 |
13 |
| 12407 |
92 |
Gramiyaa Cold Pressed Sesame Oil 4 Litre |
Roadskye Tradecom Pvt. Ltd. |
272 |
527 |
P |
0 |
0 |
0 |
13 |
| 21293 |
56 |
Wood Cold Pressed Groudnut/Peanut Cooking Oil - 1L |
Roadskye Tradecom Pvt. Ltd. |
417 |
637 |
P |
0 |
0 |
0 |
13 |
| 21294 |
72 |
Wood Cold Pressed Groudnut/Peanut Cooking Oil - 5L |
Roadskye Tradecom Pvt. Ltd. |
417 |
637 |
P |
0 |
0 |
0 |
13 |
| 32072 |
19 |
Cold Pressed Coconut Oil - 1L |
Roadskye Tradecom Pvt. Ltd. |
592 |
781 |
P |
0 |
0 |
0 |
13 |
| 32073 |
20 |
Cold Pressed Coconut Oil - 500ml |
Roadskye Tradecom Pvt. Ltd. |
592 |
781 |
P |
0 |
0 |
0 |
13 |
| 32074 |
18 |
Cold Pressed Groundnut Oil - 1L |
Roadskye Tradecom Pvt. Ltd. |
592 |
782 |
P |
0 |
0 |
0 |
13 |
| 32075 |
20 |
Cold Pressed Groundnut Oil - 500ml |
Roadskye Tradecom Pvt. Ltd. |
592 |
782 |
P |
0 |
0 |
0 |
13 |
| 32076 |
20 |
Cold Pressed Sesame Oil - 1L |
Roadskye Tradecom Pvt. Ltd. |
592 |
783 |
P |
0 |
0 |
0 |
13 |
| 32077 |
20 |
Cold Pressed Sesame Oil - 500ml |
Roadskye Tradecom Pvt. Ltd. |
592 |
783 |
P |
0 |
0 |
0 |
13 |