Re: Column as arrays.. more efficient than columns?

From: Ron Johnson <ron(dot)l(dot)johnson(at)cox(dot)net>
To: pgsql-general(at)postgresql(dot)org
Subject: Re: Column as arrays.. more efficient than columns?
Date: 2007-09-07 13:02:52
Message-ID: 46E14BFC.4020403@cox.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On 09/07/07 07:49, Merlin Moncure wrote:
> On 9/7/07, Ron Johnson <ron(dot)l(dot)johnson(at)cox(dot)net> wrote:
>> -----BEGIN PGP SIGNED MESSAGE-----
>> Hash: SHA1
>>
>> On 09/06/07 20:53, Merlin Moncure wrote:
>> [snip]
>>> arrays are interesting and have some useful problems. however, we
>>> must first discuss the problems...first and foremost if you need to
>>> read any particular item off the array you must read the entire array
>>> from disk and you must right all items back to disk for writes.
>> Reads and writes are done at the page level, so I'm not sure this is
>> valid.
>
> sure it is...since the denormalized record is much larger (especially
> in array scenarios), the tuple is much larger meaning the page will
> fill up much more quickly meaning more dead pages, more vacuuming,
> etc. Besides that, the server has to do some work presenting the
> array as part of the read which is overhead. I didn't go into a lot
> of detail but the reasoning is sound. Here is a quick example showing
> the problem.

We agree.

What I meant was that reads and writes are done at the page level no
matter whether the table is normalized or not. Thus, to say "if you
need to read any particular item off the array you must read the
entire array from disk and you must right all items back to disk for
writes." is... irrelevant.

That's probably an imprecise word, but it's all I can think of at
the moment.

We also agree regarding big records filling pages faster.

- --
Ron Johnson, Jr.
Jefferson LA USA

Give a man a fish, and he eats for a day.
Hit him with a fish, and he goes away for good!

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.6 (GNU/Linux)

iD8DBQFG4Uv8S9HxQb37XmcRAk2rAKCpxsJjhcMbvHJB5GrZOzNsUXgmWwCg7Cy0
CEU8zlbHGG9JvZgCSm/hajE=
=/Uv/
-----END PGP SIGNATURE-----

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Richard Huxton 2007-09-07 13:23:34 Re: debuging transactions
Previous Message Merlin Moncure 2007-09-07 12:49:47 Re: Column as arrays.. more efficient than columns?