Query time 0.00111
JSON explain
{
"query_block": {
"select_id": 1,
"cost_info": {
"query_cost": "60.00"
},
"grouping_operation": {
"using_temporary_table": true,
"using_filesort": true,
"table": {
"table_name": "cscart_ult_product_prices",
"access_type": "ref",
"possible_keys": [
"usergroup",
"product_id",
"company_id",
"lower_limit",
"usergroup_id"
],
"key": "company_id",
"used_key_parts": [
"company_id"
],
"key_length": "4",
"ref": [
"const"
],
"rows_examined_per_scan": 240,
"rows_produced_per_join": 8,
"filtered": "3.48",
"index_condition": "(`rajansecarter_single_store_19_jan`.`cscart_ult_product_prices`.`company_id` <=> 1)",
"cost_info": {
"read_cost": "12.00",
"eval_cost": "1.67",
"prefix_cost": "60.00",
"data_read_per_join": "267"
},
"used_columns": [
"product_id",
"price",
"percentage_discount",
"lower_limit",
"company_id",
"usergroup_id"
],
"attached_condition": "((`rajansecarter_single_store_19_jan`.`cscart_ult_product_prices`.`lower_limit` = 1) and (`rajansecarter_single_store_19_jan`.`cscart_ult_product_prices`.`product_id` in (81,82,83,84,85,86,87,88,89,90,91,92,93,94,95,96,97,100,101,102,103,104,105,106,107,108,109,110,111,112,113,114)) and (`rajansecarter_single_store_19_jan`.`cscart_ult_product_prices`.`usergroup_id` in (0,0,1)))"
}
}
}
}
Result
| product_id |
price |
| 81 |
49.500000 |
| 82 |
19.990000 |
| 83 |
19.990000 |
| 84 |
19.990000 |
| 85 |
19.990000 |
| 86 |
359.000000 |
| 87 |
19.990000 |
| 88 |
39.990000 |
| 89 |
19.990000 |
| 90 |
19.990000 |
| 91 |
10700.000000 |
| 92 |
3225.000000 |
| 93 |
19.990000 |
| 94 |
59.990000 |
| 95 |
19.990000 |
| 96 |
99.990000 |
| 97 |
14.990000 |
| 100 |
22.700000 |
| 101 |
188.880000 |
| 102 |
295.000000 |
| 103 |
23.990000 |
| 104 |
29.950000 |
| 105 |
169.990000 |
| 106 |
179.990000 |
| 107 |
465.000000 |
| 108 |
12.990000 |
| 109 |
140.000000 |
| 110 |
15.990000 |
| 111 |
6.990000 |
| 112 |
8.990000 |
| 113 |
449.990000 |
| 114 |
14.990000 |