Re: Column storage positions
От | Stephan Szabo |
---|---|
Тема | Re: Column storage positions |
Дата | |
Msg-id | 20070221111923.U81529@megazone.bigpanda.com обсуждение исходный текст |
Ответ на | Re: Column storage positions (Martijn van Oosterhout <kleptog@svana.org>) |
Ответы |
Re: Column storage positions
|
Список | pgsql-hackers |
On Wed, 21 Feb 2007, Martijn van Oosterhout wrote: > On Wed, Feb 21, 2007 at 12:06:30PM -0500, Phil Currier wrote: > > Well, for two reasons: > > > > 1) If you have a table with one very-frequently-accessed varchar() > > column and several not-frequently-accessed int columns, it might > > actually make sense to put the varchar column first. The system won't > > always be able to make the most intelligent decision about table > > layout. > > Umm, the point of the exercise is that if you know there are int > columns, then you can skip over them, whereas you can never skip over a > varchar column. So there isn't really any situation where it would be > better to put the varchar first. IIRC, in the first message in this thread, or another recent thread of this type, someone tried a reordering example with alternating smallints and varchar() and found that the leftmost varchar was actually slower to access after reordering, so I'm not sure that we can say there isn't a situation where it would affect things.
В списке pgsql-hackers по дате отправления: