4 ms·
I was never a fan of SELECT * as it felt lazy, and a bit of a pain when joining multiple tables. Also, if you happen to only need the columns that are covered
by protomyth 6y ago
I was never a fan of SELECT * as it felt lazy, and a bit of a pain when joining multiple tables. Also, if you happen to only need the columns that are covered by indexes (a covered query), then you are actually really slowing yourself down quite a bit. Extra columns mean extra memory and extra bandwidth. They also affect caching.
Plus, despite everything, the optimizer is not perfect and some extra columns might change your query plan (Sybase had so much fun with this stuff).