Query time 0.00288
JSON explain
{
"query_block": {
"select_id": 1,
"cost_info": {
"query_cost": "55.88"
},
"nested_loop": [
{
"table": {
"table_name": "inventory",
"access_type": "system",
"possible_keys": [
"pc"
],
"rows_examined_per_scan": 0,
"rows_produced_per_join": 1,
"filtered": "0.00",
"const_row_not_found": true,
"cost_info": {
"read_cost": "0.00",
"eval_cost": "0.10",
"prefix_cost": "0.00",
"data_read_per_join": "880"
},
"used_columns": [
"product_id",
"amount"
]
}
},
{
"table": {
"table_name": "cscart_categories",
"access_type": "const",
"possible_keys": [
"PRIMARY",
"c_status",
"p_category_id"
],
"key": "PRIMARY",
"used_key_parts": [
"category_id"
],
"key_length": "3",
"ref": [
"const"
],
"rows_examined_per_scan": 1,
"rows_produced_per_join": 1,
"filtered": "100.00",
"cost_info": {
"read_cost": "0.00",
"eval_cost": "0.10",
"prefix_cost": "0.00",
"data_read_per_join": "2K"
},
"used_columns": [
"category_id",
"company_id",
"usergroup_ids",
"status"
]
}
},
{
"table": {
"table_name": "products_categories",
"access_type": "ref",
"possible_keys": [
"PRIMARY",
"pt"
],
"key": "PRIMARY",
"used_key_parts": [
"category_id"
],
"key_length": "3",
"ref": [
"const"
],
"rows_examined_per_scan": 201,
"rows_produced_per_join": 201,
"filtered": "100.00",
"using_index": true,
"cost_info": {
"read_cost": "1.28",
"eval_cost": "20.10",
"prefix_cost": "21.38",
"data_read_per_join": "3K"
},
"used_columns": [
"product_id",
"category_id"
]
}
},
{
"table": {
"table_name": "products",
"access_type": "eq_ref",
"possible_keys": [
"PRIMARY",
"status"
],
"key": "PRIMARY",
"used_key_parts": [
"product_id"
],
"key_length": "3",
"ref": [
"maniamall_cscart.products_categories.product_id"
],
"rows_examined_per_scan": 1,
"rows_produced_per_join": 10,
"filtered": "5.00",
"cost_info": {
"read_cost": "0.00",
"eval_cost": "1.01",
"prefix_cost": "41.48",
"data_read_per_join": "43K"
},
"used_columns": [
"product_id",
"status",
"amount",
"usergroup_ids",
"tracking"
],
"attached_condition": "((`maniamall_cscart`.`products`.`status` = 'A') and (0 <> (case `maniamall_cscart`.`products`.`tracking` when 'O' then <cache>((NULL > 0)) when 'B' then (`maniamall_cscart`.`products`.`amount` > 0) else 1 end)) and ((`maniamall_cscart`.`products`.`usergroup_ids` = '') or (0 <> find_in_set(0,`maniamall_cscart`.`products`.`usergroup_ids`)) or (0 <> find_in_set(1,`maniamall_cscart`.`products`.`usergroup_ids`))))"
}
},
{
"table": {
"table_name": "popularity",
"access_type": "eq_ref",
"possible_keys": [
"PRIMARY",
"total"
],
"key": "PRIMARY",
"used_key_parts": [
"product_id"
],
"key_length": "3",
"ref": [
"maniamall_cscart.products_categories.product_id"
],
"rows_examined_per_scan": 1,
"rows_produced_per_join": 10,
"filtered": "100.00",
"using_index": true,
"cost_info": {
"read_cost": "0.00",
"eval_cost": "1.01",
"prefix_cost": "42.49",
"data_read_per_join": "321"
},
"used_columns": [
"product_id"
]
}
},
{
"table": {
"table_name": "cscart_product_prices",
"access_type": "ref",
"possible_keys": [
"usergroup",
"product_id",
"lower_limit",
"usergroup_id"
],
"key": "usergroup",
"used_key_parts": [
"product_id"
],
"key_length": "3",
"ref": [
"maniamall_cscart.products_categories.product_id"
],
"rows_examined_per_scan": 1,
"rows_produced_per_join": 2,
"filtered": "25.00",
"cost_info": {
"read_cost": "9.67",
"eval_cost": "0.25",
"prefix_cost": "53.17",
"data_read_per_join": "60"
},
"used_columns": [
"product_id",
"price",
"lower_limit",
"usergroup_id"
],
"attached_condition": "((`maniamall_cscart`.`cscart_product_prices`.`lower_limit` = 1) and (`maniamall_cscart`.`cscart_product_prices`.`usergroup_id` in (0,0,1)))"
}
},
{
"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": [
"maniamall_cscart.products_categories.product_id"
],
"rows_examined_per_scan": 1,
"rows_produced_per_join": 0,
"filtered": "5.00",
"not_exists": true,
"cost_info": {
"read_cost": "2.42",
"eval_cost": "0.01",
"prefix_cost": "55.84",
"data_read_per_join": "3"
},
"used_columns": [
"product_id",
"price",
"lower_limit",
"usergroup_id"
],
"attached_condition": "(<if>(found_match(prices_2), (`maniamall_cscart`.`prices_2`.`price` is null), true) and <if>(is_not_null_compl(prices_2), ((`maniamall_cscart`.`prices_2`.`lower_limit` = 1) and (`maniamall_cscart`.`cscart_product_prices`.`price` > `maniamall_cscart`.`prices_2`.`price`) and (`maniamall_cscart`.`prices_2`.`usergroup_id` in (0,0,1))), true))"
}
},
{
"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": [
"maniamall_cscart.products_categories.product_id"
],
"rows_examined_per_scan": 1,
"rows_produced_per_join": 0,
"filtered": "100.00",
"index_condition": "<if>(is_not_null_compl(shared_prices), ((`maniamall_cscart`.`shared_prices`.`company_id` = 1) and (`maniamall_cscart`.`shared_prices`.`lower_limit` = 1) and (`maniamall_cscart`.`shared_prices`.`usergroup_id` in (0,0,1))), true)",
"cost_info": {
"read_cost": "0.03",
"eval_cost": "0.01",
"prefix_cost": "55.88",
"data_read_per_join": "4"
},
"used_columns": [
"product_id",
"price",
"lower_limit",
"company_id",
"usergroup_id"
]
}
}
]
}
}
Result
| min |
max |
| 18.74 |
162.49 |