Thus, if there are a whole bunch of columns on each table, the data in
those extra columns (e.g. - all columns aside from "id", the one that
was asked for in the result set) will indeed be drawn into memory.

Is that specific to Postgresql?  From an outside perspective it just
seems odd that potentially a large amount of data would be pulled off
disk into memory that is never used.  Perhaps there's an overriding
reason for this.

Anything else would seem odd to me. Pulling a page into memory typically has OS support, and is thus very fast. Picking and choosing bits and pieces to read would be prohibitively slow. Moreover, caching only those bits and pieces would require complicated code to decide whether the cached data is relevant to the next query. Validating cached data at the page level is much simpler, and thus faster.

Or so I assume ...

- John D. Burger
  MITRE



---------------------------(end of broadcast)---------------------------
TIP 3: Have you checked our extensive FAQ?

              http://www.postgresql.org/docs/faq

Reply via email to