From: | Marti Raudsepp <marti(at)juffo(dot)org> |
---|---|
To: | amit sehas <cun23(at)yahoo(dot)com> |
Cc: | pgsql-hackers(at)postgresql(dot)org |
Subject: | Re: array behavior |
Date: | 2011-12-19 16:54:49 |
Message-ID: | CABRT9RDLFai30omPDmE=deGUxP7O840UzwijYHVqqKGGfoHsBQ@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
On Fri, Dec 16, 2011 at 00:15, amit sehas <cun23(at)yahoo(dot)com> wrote:
> There is the TOAST mechanism for oversized tuples but that is still
> considered to be a single tuple. Is there any circumstance in which an
> attribute which is an array will be broken up into individual
> tuples which are somehow associated with the main tuple.
I think you've misunderstood TOAST. That's exactly what TOAST does now.
TOAST works by storing individual *attributes* (values) in a separate
table -- not entire tuples. All smaller columns in a row are still stored
together with other rows, and only large fields are split out.
> and additionally it may have undesirable performance impact if the queries
> are not even interested in seeing the array when fetching the object ?
If your query doesn't touch the TOASTed field, it's not even read from the
TOAST table. However, large values that are smaller than the TOAST threshold
(2kB compressed) sometimes cause problems, since they're stored inline in
the heap, bloating the table size and thus increasing the time it takes to
scan it.
Regards,
Marti
From | Date | Subject | |
---|---|---|---|
Next Message | Noah Misch | 2011-12-19 16:55:17 | Re: RangeVarGetRelid() |
Previous Message | Robert Haas | 2011-12-19 16:48:16 | Re: Escaping ":" in .pgpass - code or docs bug? |