Re: estimating # of distinct values

From: Jim Nasby <jim(at)nasby(dot)net>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: Robert Haas <robertmhaas(at)gmail(dot)com>, Tomas Vondra <tv(at)fuzzy(dot)cz>, pgsql-hackers(at)postgresql(dot)org
Subject: Re: estimating # of distinct values
Date: 2011-01-18 17:35:05
Message-ID: 02541B84-7423-41F6-AE6F-95490843EFE0@nasby.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Jan 18, 2011, at 11:32 AM, Tom Lane wrote:
> Robert Haas <robertmhaas(at)gmail(dot)com> writes:
>> On Tue, Jan 18, 2011 at 12:23 PM, Jim Nasby <jim(at)nasby(dot)net> wrote:
>>> On Jan 17, 2011, at 8:11 PM, Robert Haas wrote:
>> On Mon, Jan 17, 2011 at 7:56 PM, Jim Nasby <jim(at)nasby(dot)net> wrote:
>>>> - Forks are very possibly a more efficient way to deal with TOAST than having separate tables. There's a fair amount of overhead we pay for the current setup.
>>
>> That seems like an interesting idea, but I actually don't see why it
>> would be any more efficient, and it seems like you'd end up
>> reinventing things like vacuum and free space map management.
>>>
>>> The FSM would take some effort, but I don't think vacuum would be that hard to deal with; you'd just have to free up the space in any referenced toast forks at the same time that you vacuumed the heap.
>
>> How's that different from what vacuum does on a TOAST table now?
>
> Even more to the point: Jim hasn't provided one single reason to suppose
> that this would be better-performing than the existing approach. It
> looks to me like a large amount of work, and loss of on-disk
> compatibility, for nothing at all except the sake of change.

Yes, I was only pointing out that there were possible uses for allowing a variable number of forks per relation if Tomas felt the need to go that direction. Changing toast would certainly require some very convincing arguments as to the benefits.
--
Jim C. Nasby, Database Architect jim(at)nasby(dot)net
512.569.9461 (cell) http://jim.nasby.net

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Robert Haas 2011-01-18 17:40:40 Re: limiting hint bit I/O
Previous Message Jim Nasby 2011-01-18 17:32:54 Re: estimating # of distinct values