Blog

Your dream job? Lets Git IT.
Interactive technical interview preparation platform designed for modern developers.

XGitHub

Platform

  • Categories

Resources

  • Blog
  • About the app
  • FAQ
  • Feedback

Legal

  • Privacy Policy
  • Terms of Service

© 2025 LetsGit.IT. All rights reserved.

LetsGit.IT/Categories/Databases
Databaseseasy

Why is `SELECT *` risky in production queries?

Tags
#sql#best-practices#performance#schema
Back to categoryPractice quiz

Answer

`SELECT *` fetches more data than you need (more I/O and memory) and couples code to schema changes (adding a column can change results, payload size, or expose sensitive fields). Selecting only needed columns is clearer and can enable better index-only plans.

Related questions

Databases
Denormalization: when might you do it and what’s the trade‑off?
#database#denormalization#performance
Databases
What is a covering index (index‑only scan) and why can it be faster?
#database#indexes#covering-index
Databases
Why can `LIKE '%term%'` be slow and what are common alternatives?
#sql#like#indexes
Databases
Why can the optimizer choose a bad query plan and how do statistics help?
#optimizer#statistics#cardinality
Databases
Index selectivity: what is it and why does it matter?
#indexes#selectivity#performance
Databases
What is write amplification and why do many indexes make writes slower?
#performance#indexes#write-amplification