Query time 0.00140
JSON explain
{
"query_block": {
"select_id": 1,
"table": {
"table_name": "w",
"access_type": "range",
"possible_keys": ["PRIMARY"],
"key": "PRIMARY",
"key_length": "4",
"used_key_parts": ["warehouse_id"],
"rows": 3,
"filtered": 100,
"attached_condition": "w.warehouse_id in ('1','2','3')",
"using_index": true
},
"block-nl-join": {
"table": {
"table_name": "<derived2>",
"access_type": "ALL",
"rows": 1959,
"filtered": 100
},
"buffer_type": "flat",
"buffer_size": "130",
"join_type": "BNL",
"attached_condition": "trigcond(trigcond(1 = 1)) and trigcond(1 = 1) and trigcond(1 = 1)",
"materialized": {
"query_block": {
"select_id": 2,
"table": {
"table_name": "cscart_erp_warehouse_products",
"access_type": "index",
"key": "PRIMARY",
"key_length": "8",
"used_key_parts": ["warehouse_id", "product_id"],
"rows": 1959,
"filtered": 100,
"attached_condition": "cscart_erp_warehouse_products.product_id = 1561",
"using_index": true
}
}
}
},
"table": {
"table_name": "wp",
"access_type": "eq_ref",
"possible_keys": ["PRIMARY"],
"key": "PRIMARY",
"key_length": "8",
"used_key_parts": ["warehouse_id", "product_id"],
"ref": ["bacpvdev_db.w.warehouse_id", "p.product_id"],
"rows": 1,
"filtered": 100,
"attached_condition": "trigcond(trigcond(p.product_id is not null))"
}
}
}
Result
warehouse_id |
product_id |
amount |
1 |
1561 |
0.000 |
2 |
1561 |
0.000 |
3 |
1561 |
0.000 |