Query time 0.00938
JSON explain
{
"query_block": {
"select_id": 1,
"cost_info": {
"query_cost": "53.05"
},
"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": 7,
"rows_produced_per_join": 0,
"filtered": "14.29",
"cost_info": {
"read_cost": "1.17",
"eval_cost": "0.10",
"prefix_cost": "1.27",
"data_read_per_join": "6K"
},
"used_columns": [
"company_id",
"status",
"company"
],
"attached_condition": "(`marketplace`.`companies`.`status` = 'A')"
}
},
{
"table": {
"table_name": "products",
"access_type": "ALL",
"possible_keys": [
"PRIMARY",
"status",
"idx_parent_product_id"
],
"rows_examined_per_scan": 251,
"rows_produced_per_join": 19,
"filtered": "7.81",
"using_join_buffer": "hash join",
"cost_info": {
"read_cost": "10.12",
"eval_cost": "1.96",
"prefix_cost": "30.99",
"data_read_per_join": "83K"
},
"used_columns": [
"product_id",
"product_type",
"status",
"company_id",
"list_price",
"usergroup_ids",
"parent_product_id",
"cp_active_auction_id"
],
"attached_condition": "((`marketplace`.`products`.`company_id` = `marketplace`.`companies`.`company_id`) and (`marketplace`.`products`.`parent_product_id` = 0) and ((`marketplace`.`products`.`usergroup_ids` = '') or (0 <> find_in_set(0,`marketplace`.`products`.`usergroup_ids`)) or (0 <> find_in_set(1,`marketplace`.`products`.`usergroup_ids`))) and (`marketplace`.`products`.`status` = 'A') and (`marketplace`.`products`.`product_type` <> 'W') and (`marketplace`.`products`.`product_type` <> 'D'))"
}
},
{
"table": {
"table_name": "prices",
"access_type": "ref",
"possible_keys": [
"usergroup",
"product_id",
"lower_limit",
"usergroup_id"
],
"key": "product_id",
"used_key_parts": [
"product_id"
],
"key_length": "3",
"ref": [
"marketplace.products.product_id"
],
"rows_examined_per_scan": 1,
"rows_produced_per_join": 19,
"filtered": "98.81",
"cost_info": {
"read_cost": "4.90",
"eval_cost": "1.94",
"prefix_cost": "37.85",
"data_read_per_join": "464"
},
"used_columns": [
"product_id",
"price",
"percentage_discount",
"lower_limit",
"usergroup_id"
],
"attached_condition": "((`marketplace`.`prices`.`lower_limit` = 1) and (`marketplace`.`prices`.`usergroup_id` in (0,0,1)))"
}
},
{
"table": {
"table_name": "products_categories",
"access_type": "ref",
"possible_keys": [
"PRIMARY",
"pt"
],
"key": "pt",
"used_key_parts": [
"product_id"
],
"key_length": "3",
"ref": [
"marketplace.products.product_id"
],
"rows_examined_per_scan": 1,
"rows_produced_per_join": 19,
"filtered": "100.00",
"cost_info": {
"read_cost": "4.84",
"eval_cost": "1.94",
"prefix_cost": "44.63",
"data_read_per_join": "309"
},
"used_columns": [
"product_id",
"category_id"
]
}
},
{
"table": {
"table_name": "prices_2",
"access_type": "ref",
"possible_keys": [
"usergroup",
"product_id",
"lower_limit",
"usergroup_id"
],
"key": "product_id",
"used_key_parts": [
"product_id"
],
"key_length": "3",
"ref": [
"marketplace.products.product_id"
],
"rows_examined_per_scan": 1,
"rows_produced_per_join": 1,
"filtered": "9.88",
"not_exists": true,
"cost_info": {
"read_cost": "4.84",
"eval_cost": "0.19",
"prefix_cost": "51.41",
"data_read_per_join": "45"
},
"used_columns": [
"product_id",
"price",
"lower_limit",
"usergroup_id"
],
"attached_condition": "(<if>(found_match(prices_2), (`marketplace`.`prices_2`.`price` is null), true) and <if>(is_not_null_compl(prices_2), ((`marketplace`.`prices_2`.`lower_limit` = 1) and (`marketplace`.`prices_2`.`price` < `marketplace`.`prices`.`price`) and (`marketplace`.`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": [
"marketplace.products.product_id"
],
"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": "52.08",
"data_read_per_join": "61"
},
"used_columns": [
"product_id",
"total"
]
}
},
{
"table": {
"table_name": "ushop_categories",
"access_type": "eq_ref",
"possible_keys": [
"PRIMARY",
"c_status",
"p_category_id"
],
"key": "PRIMARY",
"used_key_parts": [
"category_id"
],
"key_length": "3",
"ref": [
"marketplace.products_categories.category_id"
],
"rows_examined_per_scan": 1,
"rows_produced_per_join": 0,
"filtered": "5.00",
"cost_info": {
"read_cost": "0.48",
"eval_cost": "0.01",
"prefix_cost": "52.75",
"data_read_per_join": "316"
},
"used_columns": [
"category_id",
"storefront_id",
"usergroup_ids",
"status"
],
"attached_condition": "(((`marketplace`.`ushop_categories`.`usergroup_ids` = '') or (0 <> find_in_set(0,`marketplace`.`ushop_categories`.`usergroup_ids`)) or (0 <> find_in_set(1,`marketplace`.`ushop_categories`.`usergroup_ids`))) and (`marketplace`.`ushop_categories`.`status` in ('A','H')) and (`marketplace`.`ushop_categories`.`storefront_id` in (0,1)))"
}
},
{
"table": {
"table_name": "absolute_rating",
"access_type": "eq_ref",
"possible_keys": [
"PRIMARY"
],
"key": "PRIMARY",
"used_key_parts": [
"object_id",
"object_type"
],
"key_length": "102",
"ref": [
"marketplace.companies.company_id",
"const"
],
"rows_examined_per_scan": 1,
"rows_produced_per_join": 0,
"filtered": "100.00",
"cost_info": {
"read_cost": "0.00",
"eval_cost": "0.01",
"prefix_cost": "52.76",
"data_read_per_join": "10"
},
"used_columns": [
"object_id",
"object_type",
"rating"
]
}
},
{
"table": {
"table_name": "ushop_product_sales",
"access_type": "eq_ref",
"possible_keys": [
"PRIMARY",
"pa"
],
"key": "PRIMARY",
"used_key_parts": [
"category_id",
"product_id"
],
"key_length": "6",
"ref": [
"marketplace.products_categories.category_id",
"marketplace.products.product_id"
],
"rows_examined_per_scan": 1,
"rows_produced_per_join": 0,
"filtered": "100.00",
"using_index": true,
"cost_info": {
"read_cost": "0.02",
"eval_cost": "0.01",
"prefix_cost": "52.80",
"data_read_per_join": "1"
},
"used_columns": [
"category_id",
"product_id"
]
}
},
{
"table": {
"table_name": "auctions",
"access_type": "ref",
"possible_keys": [
"product_id"
],
"key": "product_id",
"used_key_parts": [
"product_id"
],
"key_length": "4",
"ref": [
"marketplace.products.product_id"
],
"rows_examined_per_scan": 1,
"rows_produced_per_join": 0,
"filtered": "100.00",
"index_condition": "<if>(is_not_null_compl(auctions), (`marketplace`.`products`.`product_id` = `marketplace`.`auctions`.`product_id`), true)",
"cost_info": {
"read_cost": "0.02",
"eval_cost": "0.01",
"prefix_cost": "52.83",
"data_read_per_join": "19"
},
"used_columns": [
"product_id",
"users",
"show_on_category"
]
}
},
{
"table": {
"table_name": "ushop_users",
"access_type": "const",
"possible_keys": [
"PRIMARY"
],
"key": "PRIMARY",
"used_key_parts": [
"user_id"
],
"key_length": "3",
"ref": [
"const"
],
"rows_examined_per_scan": 1,
"rows_produced_per_join": 0,
"filtered": "100.00",
"cost_info": {
"read_cost": "0.00",
"eval_cost": "0.01",
"prefix_cost": "52.84",
"data_read_per_join": "630"
},
"used_columns": [
"user_id",
"user_type",
"company_id"
],
"attached_condition": "(<if>(found_match(ushop_users), ((0 <> (case when (`marketplace`.`products`.`cp_active_auction_id` > 0) then (((`marketplace`.`auctions`.`users` = '') or (0 <> find_in_set(0,`marketplace`.`auctions`.`users`))) and (`marketplace`.`auctions`.`show_on_category` = 'Y')) else 1 end)) or (`marketplace`.`ushop_users`.`company_id` = `marketplace`.`companies`.`company_id`)), true) and <if>(is_not_null_compl(ushop_users), ((`marketplace`.`ushop_users`.`company_id` = `marketplace`.`companies`.`company_id`) and (`marketplace`.`ushop_users`.`user_type` = 'V')), true))"
}
},
{
"table": {
"table_name": "ushop_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": [
"marketplace.products.product_id"
],
"rows_examined_per_scan": 3,
"rows_produced_per_join": 0,
"filtered": "100.00",
"using_index": true,
"cost_info": {
"read_cost": "0.03",
"eval_cost": "0.03",
"prefix_cost": "52.90",
"data_read_per_join": "227"
},
"used_columns": [
"feature_id",
"product_id",
"lang_code"
],
"attached_condition": "<if>(is_not_null_compl(ushop_product_features_values), (`marketplace`.`ushop_product_features_values`.`lang_code` = 'es'), true)"
}
},
{
"table": {
"table_name": "ushop_product_features",
"access_type": "eq_ref",
"possible_keys": [
"PRIMARY"
],
"key": "PRIMARY",
"used_key_parts": [
"feature_id"
],
"key_length": "3",
"ref": [
"marketplace.ushop_product_features_values.feature_id"
],
"rows_examined_per_scan": 1,
"rows_produced_per_join": 0,
"filtered": "100.00",
"using_index": true,
"cost_info": {
"read_cost": "0.07",
"eval_cost": "0.03",
"prefix_cost": "53.00",
"data_read_per_join": "128"
},
"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": [
"marketplace.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.03",
"prefix_cost": "53.05",
"data_read_per_join": "1K"
},
"used_columns": [
"product_id",
"lang_code",
"product"
]
}
}
]
}
}
}
}
Result
| product_id |
product |
company_name |
popularity |
price |
absolute_vendor_rating |
product_type |
parent_product_id |
list_price |
sales_discount |
| 430 |
Wildwood city classic |
Ferrequipo |
100573 |
120.00000000 |
53453 |
P |
0 |
600.00 |
80.000000 |
| 428 |
16GB A Series Walkman Video MP3 |
Ferrequipo |
111618 |
50.00000000 |
53453 |
P |
0 |
219.00 |
77.168950 |
| 429 |
8GB E Series Walkman Video MP3 |
Ferrequipo |
92889 |
53.99000000 |
53453 |
P |
0 |
89.99 |
40.004445 |
| 289 |
46" Class (45.9" Diag.) LCD 610 Series TV |
Ferrequipo |
96460 |
899.99000000 |
53453 |
P |
0 |
1199.99 |
25.000208 |
| 287 |
65" Class (64.5" Diag.) LED 8000 Series Smart TV |
Ferrequipo |
97769 |
5399.99000000 |
53453 |
P |
0 |
6499.99 |
16.923103 |
| 307 |
5.1 Channel Blu-ray 3D Home Theater System |
Ferrequipo |
97887 |
599.99000000 |
53453 |
P |
0 |
699.99 |
14.285918 |
| 292 |
Toshiba 32TL515U 32" Class 1080P 3D LED HD TV |
Ferrequipo |
90930 |
849.99000000 |
53453 |
P |
0 |
949.99 |
10.526427 |
| 452 |
Compact Full HD Camcorder |
Ferrequipo |
48792 |
299.99000000 |
53453 |
P |
0 |
334.00 |
10.182635 |
| 516 |
Apple iPhone 4S Black |
Ferrequipo |
129010 |
499.99000000 |
53453 |
P |
0 |
552.00 |
9.422101 |
| 447 |
D3100 + 18-55 VR Lens Kit |
Ferrequipo |
126109 |
549.95000000 |
53453 |
P |
0 |
599.95 |
8.334028 |
| 517 |
Apple iPhone 4S White |
Ferrequipo |
145741 |
509.99000000 |
53453 |
P |
0 |
552.00 |
7.610507 |
| 296 |
100g Pants |
Ferrequipo |
53118 |
30.00000000 |
53453 |
P |
0 |
31.00 |
3.225806 |
| 361 |
adiZero Tempaia Shoes |
Ferrequipo |
49460 |
96.00000000 |
53453 |
P |
0 |
98.00 |
2.040816 |
| 297 |
Your Idea, Inc. 12 Steps to Building a Million Dollar Business -- Starting Today! |
Ferrequipo |
53190 |
11.96000000 |
53453 |
P |
0 |
12.00 |
0.333333 |