Re: Plan time Improvement - 64bit bitmapset

From: Greg Stark <greg(dot)stark(at)enterprisedb(dot)com>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: Kevin Grittner <Kevin(dot)Grittner(at)wicourts(dot)gov>, Robert Haas <robertmhaas(at)gmail(dot)com>, Andres Freund <andres(at)anarazel(dot)de>, Gregory Stark <stark(at)enterprisedb(dot)com>, pgsql-hackers(at)postgresql(dot)org
Subject: Re: Plan time Improvement - 64bit bitmapset
Date: 2009-06-03 21:56:07
Message-ID: CE6D8A0D-F31C-4438-999C-B0911E67DBA0@enterprisedb.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Doesn't that still add up to 3GB for a table's stats in the worst
case? 1kb * 1,000 buckets * 1,500 attributes * 2 (histogram + mfv)

Except you can't actually get 1500 toast pointers on a page. I suppose
with games with nulls you could make this worst case happen though.

It does seem like it ought to be possible to truncate strings in the
histogram since any string between the actual values us equally good.

--
Greg

On 3 Jun 2009, at 22:11, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> wrote:

> "Kevin Grittner" <Kevin(dot)Grittner(at)wicourts(dot)gov> writes:
>> Since he can't share the schema, and hasn't even given much of a
>> hint,
>> I don't know whether one (or more) of the columns is a bytea filled
>> with 100 MB values; and I don't remember any description of the
>> hardware environment either. Since the behavior seems so
>> out-of-the-ordinary, I was casting about for possible extraordinary
>> characteristics of his environment which might cause it. I'm
>> probably
>> way off base....
>
> There's a hard-wired restriction in analyze.c that makes it discard
> data
> values wider than 1KB on-sight. So no such value will ever be found
> in
> a statistics array. You could still have a few meg in a pg_statistics
> row, I suppose, but not a really horrendous amount.
>
> regards, tom lane

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2009-06-03 21:59:03 Re: Plan time Improvement - 64bit bitmapset
Previous Message Andres Freund 2009-06-03 21:55:27 Re: Plan time Improvement - 64bit bitmapset