logoalt Hacker News

wordofx05/04/20251 replyview on HN

Why was the author not just doing returning *

No need for the CTE to select everything…


Replies

tomnipotent05/04/2025

Could be a generational thing. There was a time not every query planner would properly eliminate columns based on the final projection and any intermediary copies required more I/O if you included everything. Even now I still find myself following "best practices" for things that haven't been relevant in a decade.