What does the following query return and what performance concern does it raise? SELECT * FROM orders WHERE YEAR(order_date) = 2023
Key points
- The function YEAR() prevents index use on order_date
- Full table scan occurs due to the function in the WHERE clause
- Performance concern arises from lack of index utilization
Ready to go further?
