Query time 0.00082
JSON explain
{
"query_block": {
"select_id": 1,
"cost_info": {
"query_cost": "6.01"
},
"ordering_operation": {
"using_temporary_table": true,
"using_filesort": true,
"cost_info": {
"sort_cost": "1.00"
},
"nested_loop": [
{
"table": {
"table_name": "rf",
"access_type": "ALL",
"possible_keys": [
"PRIMARY"
],
"rows_examined_per_scan": 3,
"rows_produced_per_join": 1,
"filtered": "33.33",
"cost_info": {
"read_cost": "2.41",
"eval_cost": "0.20",
"prefix_cost": "2.61",
"data_read_per_join": "16"
},
"used_columns": [
"facility_id",
"status",
"timestamp"
],
"attached_condition": "((`pankajecarter_systemfour`.`rf`.`status` = 'A') and (`pankajecarter_systemfour`.`rf`.`facility_id` is not null))"
}
},
{
"table": {
"table_name": "prf",
"access_type": "eq_ref",
"possible_keys": [
"product_facility",
"product_id",
"facility_id"
],
"key": "product_facility",
"used_key_parts": [
"product_id",
"facility_id"
],
"key_length": "6",
"ref": [
"const",
"pankajecarter_systemfour.rf.facility_id"
],
"rows_examined_per_scan": 1,
"rows_produced_per_join": 1,
"filtered": "100.00",
"cost_info": {
"read_cost": "1.00",
"eval_cost": "0.20",
"prefix_cost": "3.81",
"data_read_per_join": "16"
},
"used_columns": [
"id",
"product_id",
"facility_id"
]
}
},
{
"table": {
"table_name": "rfd",
"access_type": "eq_ref",
"possible_keys": [
"PRIMARY"
],
"key": "PRIMARY",
"used_key_parts": [
"facility_id",
"lang_code"
],
"key_length": "9",
"ref": [
"pankajecarter_systemfour.rf.facility_id",
"const"
],
"rows_examined_per_scan": 1,
"rows_produced_per_join": 1,
"filtered": "100.00",
"cost_info": {
"read_cost": "1.00",
"eval_cost": "0.20",
"prefix_cost": "5.01",
"data_read_per_join": "784"
},
"used_columns": [
"facility_id",
"lang_code",
"title"
]
}
}
]
}
}
}
Result
| id |
product_id |
facility_id |
status |
timestamp |
title |
| 8 |
180 |
2 |
A |
1764744959 |
Room Facility 1 |
| 9 |
180 |
3 |
A |
1764746242 |
Room Facility 2 |
| 10 |
180 |
4 |
A |
1764761088 |
Room facility 3 |