Using SELECT * may seem convenient, but it’s a bad habit for multiple reasons.
Indexes can significantly speed up data retrieval. However, failing to use indexes properly leads to slower queries.
Subqueries are often used when developers are unaware of efficient joins. Subqueries can be slower and harder to read compared to proper JOIN operations.
Failing to sanitize user inputs opens the door for SQL injection attacks, which can compromise your database.