Query time 0.01591
JSON explain
{
"query_block": {
"select_id": 1,
"cost_info": {
"query_cost": "232.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": 2,
"rows_produced_per_join": 1,
"filtered": "50.00",
"cost_info": {
"read_cost": "2.28",
"eval_cost": "0.20",
"prefix_cost": "2.48",
"data_read_per_join": "5K"
},
"used_columns": [
"company_id",
"status",
"company"
],
"attached_condition": "(`rajansecarter_single_store_19_jan`.`companies`.`status` = 'A')"
}
},
{
"table": {
"table_name": "cscart_categories",
"access_type": "ALL",
"possible_keys": [
"PRIMARY",
"c_status",
"p_category_id"
],
"rows_examined_per_scan": 166,
"rows_produced_per_join": 6,
"filtered": "4.00",
"using_join_buffer": "Block Nested Loop",
"cost_info": {
"read_cost": "36.94",
"eval_cost": "1.33",
"prefix_cost": "40.75",
"data_read_per_join": "17K"
},
"used_columns": [
"category_id",
"company_id",
"storefront_id",
"usergroup_ids",
"status"
],
"attached_condition": "(((`rajansecarter_single_store_19_jan`.`cscart_categories`.`usergroup_ids` = '') or find_in_set(0,`rajansecarter_single_store_19_jan`.`cscart_categories`.`usergroup_ids`) or find_in_set(1,`rajansecarter_single_store_19_jan`.`cscart_categories`.`usergroup_ids`)) and (`rajansecarter_single_store_19_jan`.`cscart_categories`.`status` in ('A','H')) and (`rajansecarter_single_store_19_jan`.`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": [
"rajansecarter_single_store_19_jan.cscart_categories.category_id"
],
"rows_examined_per_scan": 5,
"rows_produced_per_join": 33,
"filtered": "100.00",
"using_index": true,
"cost_info": {
"read_cost": "7.36",
"eval_cost": "6.64",
"prefix_cost": "54.74",
"data_read_per_join": "531"
},
"used_columns": [
"product_id",
"category_id"
]
}
},
{
"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": [
"rajansecarter_single_store_19_jan.products_categories.product_id"
],
"rows_examined_per_scan": 1,
"rows_produced_per_join": 3,
"filtered": "9.56",
"cost_info": {
"read_cost": "33.20",
"eval_cost": "0.63",
"prefix_cost": "94.58",
"data_read_per_join": "14K"
},
"used_columns": [
"product_id",
"product_type",
"status",
"company_id",
"list_price",
"usergroup_ids",
"parent_product_id"
],
"attached_condition": "((`rajansecarter_single_store_19_jan`.`products`.`company_id` = `rajansecarter_single_store_19_jan`.`companies`.`company_id`) and (`rajansecarter_single_store_19_jan`.`products`.`parent_product_id` = 0) and ((`rajansecarter_single_store_19_jan`.`products`.`usergroup_ids` = '') or find_in_set(0,`rajansecarter_single_store_19_jan`.`products`.`usergroup_ids`) or find_in_set(1,`rajansecarter_single_store_19_jan`.`products`.`usergroup_ids`)) and (`rajansecarter_single_store_19_jan`.`products`.`status` = 'A'))"
}
},
{
"table": {
"table_name": "prices",
"access_type": "ref",
"possible_keys": [
"usergroup",
"product_id",
"lower_limit",
"usergroup_id"
],
"key": "usergroup",
"used_key_parts": [
"product_id"
],
"key_length": "3",
"ref": [
"rajansecarter_single_store_19_jan.products_categories.product_id"
],
"rows_examined_per_scan": 2,
"rows_produced_per_join": 6,
"filtered": "96.85",
"index_condition": "((`rajansecarter_single_store_19_jan`.`prices`.`lower_limit` = 1) and (`rajansecarter_single_store_19_jan`.`prices`.`usergroup_id` in (0,0,1)))",
"cost_info": {
"read_cost": "8.06",
"eval_cost": "1.23",
"prefix_cost": "103.92",
"data_read_per_join": "147"
},
"used_columns": [
"product_id",
"price",
"percentage_discount",
"lower_limit",
"usergroup_id"
]
}
},
{
"table": {
"table_name": "prices_2",
"access_type": "ref",
"possible_keys": [
"usergroup",
"product_id",
"lower_limit",
"usergroup_id"
],
"key": "usergroup",
"used_key_parts": [
"product_id"
],
"key_length": "3",
"ref": [
"rajansecarter_single_store_19_jan.products_categories.product_id"
],
"rows_examined_per_scan": 2,
"rows_produced_per_join": 1,
"filtered": "9.69",
"not_exists": true,
"cost_info": {
"read_cost": "15.62",
"eval_cost": "0.24",
"prefix_cost": "121.99",
"data_read_per_join": "28"
},
"used_columns": [
"product_id",
"price",
"lower_limit",
"usergroup_id"
],
"attached_condition": "(<if>(found_match(prices_2), isnull(`rajansecarter_single_store_19_jan`.`prices_2`.`price`), true) and <if>(is_not_null_compl(prices_2), ((`rajansecarter_single_store_19_jan`.`prices_2`.`lower_limit` = 1) and (`rajansecarter_single_store_19_jan`.`prices_2`.`price` < `rajansecarter_single_store_19_jan`.`prices`.`price`) and (`rajansecarter_single_store_19_jan`.`prices_2`.`usergroup_id` in (0,0,1))), true))"
}
},
{
"table": {
"table_name": "popularity",
"access_type": "eq_ref",
"possible_keys": [
"PRIMARY",
"total"
],
"key": "PRIMARY",
"used_key_parts": [
"product_id"
],
"key_length": "3",
"ref": [
"rajansecarter_single_store_19_jan.products_categories.product_id"
],
"rows_examined_per_scan": 1,
"rows_produced_per_join": 1,
"filtered": "100.00",
"cost_info": {
"read_cost": "0.61",
"eval_cost": "0.24",
"prefix_cost": "122.84",
"data_read_per_join": "38"
},
"used_columns": [
"product_id",
"total"
]
}
},
{
"table": {
"table_name": "shared_descr",
"access_type": "eq_ref",
"possible_keys": [
"PRIMARY",
"product_id",
"company_id"
],
"key": "PRIMARY",
"used_key_parts": [
"product_id",
"lang_code",
"company_id"
],
"key_length": "13",
"ref": [
"rajansecarter_single_store_19_jan.products_categories.product_id",
"const",
"const"
],
"rows_examined_per_scan": 1,
"rows_produced_per_join": 1,
"filtered": "100.00",
"cost_info": {
"read_cost": "0.61",
"eval_cost": "0.24",
"prefix_cost": "123.70",
"data_read_per_join": "4K"
},
"used_columns": [
"product_id",
"lang_code",
"company_id",
"product"
]
}
},
{
"table": {
"table_name": "shared_prices",
"access_type": "ref",
"possible_keys": [
"usergroup",
"product_id",
"company_id",
"lower_limit",
"usergroup_id"
],
"key": "usergroup",
"used_key_parts": [
"product_id"
],
"key_length": "3",
"ref": [
"rajansecarter_single_store_19_jan.products_categories.product_id"
],
"rows_examined_per_scan": 5,
"rows_produced_per_join": 5,
"filtered": "100.00",
"cost_info": {
"read_cost": "6.00",
"eval_cost": "1.19",
"prefix_cost": "130.89",
"data_read_per_join": "190"
},
"used_columns": [
"product_id",
"price",
"percentage_discount",
"lower_limit",
"company_id",
"usergroup_id"
],
"attached_condition": "<if>(is_not_null_compl(shared_prices), ((`rajansecarter_single_store_19_jan`.`shared_prices`.`company_id` = 1) and (`rajansecarter_single_store_19_jan`.`shared_prices`.`lower_limit` = 1) and (`rajansecarter_single_store_19_jan`.`shared_prices`.`usergroup_id` in (0,0,1))), true)"
}
},
{
"table": {
"table_name": "shared_prices_2",
"access_type": "ref",
"possible_keys": [
"usergroup",
"product_id",
"company_id",
"lower_limit",
"usergroup_id"
],
"key": "usergroup",
"used_key_parts": [
"product_id"
],
"key_length": "3",
"ref": [
"rajansecarter_single_store_19_jan.shared_prices.product_id"
],
"rows_examined_per_scan": 5,
"rows_produced_per_join": 1,
"filtered": "4.63",
"not_exists": true,
"cost_info": {
"read_cost": "30.01",
"eval_cost": "0.28",
"prefix_cost": "166.86",
"data_read_per_join": "44"
},
"used_columns": [
"product_id",
"price",
"lower_limit",
"company_id",
"usergroup_id"
],
"attached_condition": "(<if>(found_match(shared_prices_2), isnull(`rajansecarter_single_store_19_jan`.`shared_prices_2`.`price`), true) and <if>(is_not_null_compl(shared_prices_2), ((`rajansecarter_single_store_19_jan`.`shared_prices_2`.`lower_limit` = 1) and (`rajansecarter_single_store_19_jan`.`shared_prices_2`.`company_id` = 1) and (`rajansecarter_single_store_19_jan`.`shared_prices_2`.`price` < `rajansecarter_single_store_19_jan`.`shared_prices`.`price`) and (`rajansecarter_single_store_19_jan`.`shared_prices_2`.`usergroup_id` in (0,0,1))), true))"
}
},
{
"table": {
"table_name": "cscart_product_sales",
"access_type": "eq_ref",
"possible_keys": [
"PRIMARY",
"pa"
],
"key": "PRIMARY",
"used_key_parts": [
"category_id",
"product_id"
],
"key_length": "6",
"ref": [
"rajansecarter_single_store_19_jan.cscart_categories.category_id",
"rajansecarter_single_store_19_jan.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.14",
"eval_cost": "0.28",
"prefix_cost": "167.27",
"data_read_per_join": "22"
},
"used_columns": [
"category_id",
"product_id"
]
}
},
{
"table": {
"table_name": "bs_shared_prices",
"access_type": "ref",
"possible_keys": [
"usergroup",
"product_id",
"company_id",
"lower_limit",
"usergroup_id"
],
"key": "usergroup",
"used_key_parts": [
"product_id"
],
"key_length": "3",
"ref": [
"rajansecarter_single_store_19_jan.products_categories.product_id"
],
"rows_examined_per_scan": 5,
"rows_produced_per_join": 6,
"filtered": "100.00",
"cost_info": {
"read_cost": "6.95",
"eval_cost": "1.38",
"prefix_cost": "175.60",
"data_read_per_join": "220"
},
"used_columns": [
"product_id",
"price",
"percentage_discount",
"lower_limit",
"company_id",
"usergroup_id"
],
"attached_condition": "<if>(is_not_null_compl(bs_shared_prices), ((`rajansecarter_single_store_19_jan`.`bs_shared_prices`.`company_id` = 1) and (`rajansecarter_single_store_19_jan`.`bs_shared_prices`.`lower_limit` = 1) and (`rajansecarter_single_store_19_jan`.`bs_shared_prices`.`usergroup_id` in (0,0,1))), true)"
}
},
{
"table": {
"table_name": "cscart_product_features_values",
"access_type": "ref",
"possible_keys": [
"lang_code",
"product_id",
"idx_product_feature_variant_id"
],
"key": "idx_product_feature_variant_id",
"used_key_parts": [
"product_id"
],
"key_length": "3",
"ref": [
"rajansecarter_single_store_19_jan.products_categories.product_id"
],
"rows_examined_per_scan": 11,
"rows_produced_per_join": 75,
"filtered": "100.00",
"using_index": true,
"cost_info": {
"read_cost": "9.67",
"eval_cost": "15.16",
"prefix_cost": "200.44",
"data_read_per_join": "58K"
},
"used_columns": [
"feature_id",
"product_id",
"lang_code"
],
"attached_condition": "<if>(is_not_null_compl(cscart_product_features_values), (`rajansecarter_single_store_19_jan`.`cscart_product_features_values`.`lang_code` = 'en'), true)"
}
},
{
"table": {
"table_name": "cscart_product_features",
"access_type": "eq_ref",
"possible_keys": [
"PRIMARY"
],
"key": "PRIMARY",
"used_key_parts": [
"feature_id"
],
"key_length": "3",
"ref": [
"rajansecarter_single_store_19_jan.cscart_product_features_values.feature_id"
],
"rows_examined_per_scan": 1,
"rows_produced_per_join": 75,
"filtered": "100.00",
"using_index": true,
"cost_info": {
"read_cost": "1.57",
"eval_cost": "15.16",
"prefix_cost": "217.16",
"data_read_per_join": "32K"
},
"used_columns": [
"feature_id"
]
}
},
{
"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": [
"rajansecarter_single_store_19_jan.products_categories.product_id",
"const"
],
"rows_examined_per_scan": 1,
"rows_produced_per_join": 75,
"filtered": "100.00",
"cost_info": {
"read_cost": "0.14",
"eval_cost": "15.16",
"prefix_cost": "232.47",
"data_read_per_join": "345K"
},
"used_columns": [
"product_id",
"lang_code",
"product"
]
}
}
]
}
}
}
}
Result
| product_id |
product |
company_name |
popularity |
price |
product_type |
parent_product_id |
list_price |
sales_discount |
is_shared_product |
| 150 |
Wildwood city classic |
CS-Cart |
45 |
120.000000 |
P |
0 |
600.00 |
80.000000000000 |
N |
| 282 |
T-shirt, Color: Blue |
CS-Cart |
89 |
27.990000 |
P |
0 |
75.00 |
62.680000000000 |
N |
| 278 |
T-shirt, Color: White |
CS-Cart |
57 |
30.000000 |
P |
0 |
75.00 |
60.000000000000 |
N |
| 148 |
16GB A Series Walkman Video MP3 |
CS-Cart |
33 |
130.000000 |
P |
0 |
219.00 |
40.639269406393 |
N |
| 149 |
8GB E Series Walkman Video MP3 |
CS-Cart |
45 |
53.990000 |
P |
0 |
89.99 |
40.004444938326 |
N |
| 280 |
T-shirt, Color: Black |
CS-Cart |
85 |
36.000000 |
P |
0 |
50.00 |
28.000000000000 |
N |
| 5 |
46" Class (45.9" Diag.) LCD 610 Series TV |
CS-Cart |
39 |
899.990000 |
P |
0 |
1199.99 |
25.000208335069 |
N |
| 1 |
65" Class (64.5" Diag.) LED 8000 Series Smart TV |
CS-Cart |
60 |
5399.990000 |
P |
0 |
6499.99 |
16.923102958620 |
N |
| 23 |
5.1 Channel Blu-ray 3D Home Theater System |
CS-Cart |
33 |
599.990000 |
P |
0 |
699.99 |
14.285918370262 |
N |
| 8 |
Toshiba 32TL515U 32" Class 1080P 3D LED HD TV |
CS-Cart |
51 |
849.990000 |
P |
0 |
949.99 |
10.526426593964 |
N |