Query time 0.00113
JSON explain
{
"query_block": {
"select_id": 1,
"read_sorted_file": {
"filesort": {
"sort_key": "cscart_loyalty_program.amount",
"table": {
"table_name": "cscart_loyalty_program",
"access_type": "ALL",
"possible_keys": ["PRIMARY", "status"],
"rows": 6,
"filtered": 100,
"attached_condition": "cscart_loyalty_program.`status` = 'A'"
}
}
},
"table": {
"table_name": "cscart_loyalty_program_descriptions",
"access_type": "eq_ref",
"possible_keys": ["PRIMARY"],
"key": "PRIMARY",
"key_length": "9",
"used_key_parts": ["card_id", "lang_code"],
"ref": ["noframes_angrybeaver.cscart_loyalty_program.card_id", "const"],
"rows": 1,
"filtered": 100,
"attached_condition": "trigcond(cscart_loyalty_program_descriptions.lang_code = 'ru')"
},
"table": {
"table_name": "cscart_loyalty_program_images",
"access_type": "eq_ref",
"possible_keys": ["card"],
"key": "card",
"key_length": "9",
"used_key_parts": ["card_id", "lang_code"],
"ref": ["noframes_angrybeaver.cscart_loyalty_program.card_id", "const"],
"rows": 1,
"filtered": 100,
"attached_condition": "trigcond(cscart_loyalty_program_images.lang_code = 'ru')"
},
"table": {
"table_name": "cscart_usergroup_descriptions",
"access_type": "eq_ref",
"possible_keys": ["PRIMARY"],
"key": "PRIMARY",
"key_length": "9",
"used_key_parts": ["usergroup_id", "lang_code"],
"ref": ["noframes_angrybeaver.cscart_loyalty_program.usergroup_id", "const"],
"rows": 1,
"filtered": 100,
"attached_condition": "trigcond(cscart_usergroup_descriptions.lang_code = 'ru')"
},
"table": {
"table_name": "cscart_ult_objects_sharing",
"access_type": "eq_ref",
"possible_keys": ["PRIMARY"],
"key": "PRIMARY",
"key_length": "159",
"used_key_parts": [
"share_object_id",
"share_company_id",
"share_object_type"
],
"ref": [
"noframes_angrybeaver.cscart_loyalty_program.card_id",
"const",
"const"
],
"rows": 1,
"filtered": 100,
"attached_condition": "cscart_ult_objects_sharing.share_object_id = cscart_loyalty_program.card_id and cscart_ult_objects_sharing.share_object_type = 'loyalty_program'",
"using_index": true
}
}
}
Result
| card_id |
amount |
status |
usergroup_id |
name |
card_image_id |
usergroup |
description |
company_id |
| 7 |
0 |
A |
8 |
Серебро |
10 |
Серебро |
<p></p>
<p>бонус 5% от покупки.<br>* оплачивайте бонусами до 10% покупки</p>
<p></p> |
1 |
| 8 |
50000 |
A |
9 |
Золото |
12 |
Золото |
<p>бонус 7% от покупки.</p>
<p>* оплачивайте бонусами до 20% покупки</p>
<p></p> |
1 |
| 9 |
350000 |
A |
10 |
Платина |
14 |
Платина |
<p>бонус 15% от покупки.</p>
<p>* оплачивайте бонусами до 20% покупки</p>
<p></p> |
1 |