Hacker News new | ask | show | jobs
by giantDinosaur 1951 days ago
It selects all columns. Why/when wouldn't this be bad for performance is a more interesting question, no?

(to be clear, I still enjoyed reading this.)

1 comments

There are CSV-backed "databases" that you can query with SQL. Selecting a row and returning it is basically copying a string once and replacing all CSV-separators by record separators. Doing a projection requires you to copy the string, remove all fields that are not requested, reorder the fields as requested, resulting in a few more copies, and only then transmitting the answer. So in this case it would be slower to not do 'select *'.

However, those things have always been exotic, and with the advent of SQLite have become even less common.