agora inbox for [email protected]  
help / color / mirror / Atom feed
From: Ron Mayer <[email protected]>
To: Gregory Stark <[email protected]>
Cc: Simon Riggs <[email protected]>
Cc: Robert Haas <[email protected]>
Cc: Tom Lane <[email protected]>
Cc: Kevin Grittner <[email protected]>
Cc: [email protected] <[email protected]>
Cc: Josh Berkus <[email protected]>
Cc: Greg Smith <[email protected]>
Cc: [email protected]
Subject: Re: benchmarking the query planner
Date: Fri, 12 Dec 2008 11:34:42 -0800
Message-ID: <[email protected]> (raw)
In-Reply-To: <[email protected]>
References: <[email protected]>
	<[email protected]>
	<[email protected]>
	<[email protected]>
	<[email protected]>
	<1229033073.13078.179.camel@hp_dx2400_1>
	<[email protected]>
	<1229039044.13078.193.camel@hp_dx2400_1>
	<[email protected]>
	<1229072675.13078.196.camel@hp_dx2400_1>
	<[email protected]>
	<[email protected]>
	<[email protected]>
	<[email protected]>
	<[email protected]>

Gregory Stark wrote:
> Simon Riggs <[email protected]> writes:
>> The amount of I/O could stay the same, just sample all rows on block. [....]
> 
> It will also introduce strange biases. For instance in a clustered table it'll
> think there are a lot more duplicates than there really are because it'll see
> lots of similar values.

But for ndistinct - it seems it could only help things.  If the
ndistinct guesser just picks
   max(the-current-one-row-per-block-guess,
       a-guess-based-on-all-the-rows-on-the-blocks)
it seems we'd be no worse off for clustered tables; and much
better off for randomly organized tables.


In some ways I fear *not* sampling all rows on the block also
introduces strange biases by largely overlooking the fact that
the table's clustered.

In my tables clustered on zip-code we don't notice info like
"state='AZ' is present in well under 1% of blocks in the table",
while if we did scan all rows on the blocks it might guess this.
But I guess a histogram of blocks would be additional stat rather
than an improved one.




view thread (94+ messages)  latest in thread

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: [email protected]
  Cc: [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected]
  Subject: Re: benchmarking the query planner
  In-Reply-To: <[email protected]>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by agora; see mirroring instructions
for how to clone and mirror all data and code used for this inbox