Background: I have a table called cars in which there are a lot of used cars, about 1 million rows. The table has a little over 170 columns. The table is indexed by individual columns only. Most columns are logical (e.g. has_automatic_gearbox, etc.), and the rest are strings and numbers (e.g. color and price). Cars are shown in a view where I use about 80 columns out of a total of 170.
My question: Therefore, my question is whether it affects performance, whether I select only 80 columns from the table when performing a search, or, on the other hand, I made a new table ONLY consisting of the 80 columns that I need, instead 170 columns? In other words, does performance matter that the table contains columns that are not selected?
performance sql postgresql
Niels kristian
source share