Query time 0.00085
JSON explain
{
"query_block": {
"select_id": 1,
"cost_info": {
"query_cost": "81.21"
},
"ordering_operation": {
"using_filesort": true,
"cost_info": {
"sort_cost": "14.00"
},
"nested_loop": [
{
"table": {
"table_name": "q_images_links",
"access_type": "range",
"possible_keys": [
"object_id"
],
"key": "object_id",
"used_key_parts": [
"object_id",
"object_type",
"type"
],
"key_length": "81",
"rows_examined_per_scan": 14,
"rows_produced_per_join": 14,
"filtered": "100.00",
"index_condition": "((`portal`.`q_images_links`.`object_type` = 'product') and (`portal`.`q_images_links`.`type` = 'A') and (`portal`.`q_images_links`.`object_id` in ('1505','1506','1507','1508','1509','1510','1511','1512','1513','1514','1515','1516','1517','1518')))",
"cost_info": {
"read_cost": "30.81",
"eval_cost": "2.80",
"prefix_cost": "33.61",
"data_read_per_join": "1K"
},
"used_columns": [
"pair_id",
"object_id",
"object_type",
"image_id",
"detailed_id",
"type",
"position"
]
}
},
{
"table": {
"table_name": "q_images",
"access_type": "eq_ref",
"possible_keys": [
"PRIMARY"
],
"key": "PRIMARY",
"used_key_parts": [
"image_id"
],
"key_length": "4",
"ref": [
"portal.q_images_links.image_id"
],
"rows_examined_per_scan": 1,
"rows_produced_per_join": 14,
"filtered": "100.00",
"cost_info": {
"read_cost": "14.00",
"eval_cost": "2.80",
"prefix_cost": "50.41",
"data_read_per_join": "10K"
},
"used_columns": [
"image_id",
"image_path",
"image_x",
"image_y",
"is_high_res"
]
}
},
{
"table": {
"table_name": "q_common_descriptions",
"access_type": "eq_ref",
"possible_keys": [
"PRIMARY"
],
"key": "PRIMARY",
"used_key_parts": [
"object_id",
"lang_code",
"object_holder"
],
"key_length": "107",
"ref": [
"portal.q_images.image_id",
"const",
"const"
],
"rows_examined_per_scan": 1,
"rows_produced_per_join": 14,
"filtered": "100.00",
"cost_info": {
"read_cost": "14.00",
"eval_cost": "2.80",
"prefix_cost": "67.21",
"data_read_per_join": "8K"
},
"used_columns": [
"object_id",
"description",
"lang_code",
"object_holder"
],
"attached_condition": "<if>(is_not_null_compl(q_common_descriptions), (`portal`.`q_common_descriptions`.`object_id` = `portal`.`q_images`.`image_id`), true)"
}
}
]
}
}
}
Result
image_id |
image_path |
image_x |
image_y |
is_high_res |
pair_id |
object_id |
object_type |
detailed_id |
type |
position |
alt |
images_image_id |
0 |
|
|
|
|
3553 |
1509 |
product |
5527 |
A |
1 |
|
|
0 |
|
|
|
|
3546 |
1505 |
product |
5520 |
A |
10 |
|
|
0 |
|
|
|
|
3548 |
1506 |
product |
5522 |
A |
10 |
|
|
0 |
|
|
|
|
3550 |
1507 |
product |
5524 |
A |
10 |
|
|
0 |
|
|
|
|
3552 |
1508 |
product |
5526 |
A |
10 |
|
|
0 |
|
|
|
|
3556 |
1510 |
product |
5530 |
A |
10 |
|
|
0 |
|
|
|
|
3562 |
1513 |
product |
5536 |
A |
10 |
|
|
0 |
|
|
|
|
3570 |
1517 |
product |
5544 |
A |
10 |
|
|
0 |
|
|
|
|
3558 |
1511 |
product |
5532 |
A |
20 |
|
|
0 |
|
|
|
|
3560 |
1512 |
product |
5534 |
A |
20 |
|
|
0 |
|
|
|
|
3564 |
1514 |
product |
5538 |
A |
20 |
|
|
0 |
|
|
|
|
3566 |
1515 |
product |
5540 |
A |
20 |
|
|
0 |
|
|
|
|
3568 |
1516 |
product |
5542 |
A |
20 |
|
|
0 |
|
|
|
|
3572 |
1518 |
product |
5546 |
A |
20 |
|
|