Collect stats during seqscan (was: Simple join optimized badly?) - Mailing list pgsql-performance

From Jim C. Nasby
Subject Collect stats during seqscan (was: Simple join optimized badly?)
Date
Msg-id 20061011202758.GQ13487@nasby.net
Whole thread Raw
In response to Re: Simple join optimized badly?  ("Bucky Jordan" <bjordan@lumeta.com>)
List pgsql-performance
On Wed, Oct 11, 2006 at 10:27:26AM -0400, Bucky Jordan wrote:
> Also, I'm guessing this has already come up at some point, but what
> about allowing PG to do some stat collection during queries? If you're
> touching a lot of data (such as an import process) wouldn't it be more
> efficient (and perhaps more accurate) to collect stats then, rather than
> having to re-scan? It would be nice to be able to turn this on/off on a
> per query basis, seeing as it could have pretty negative impacts on OLTP
> performance...

I suspect that could be highly useful in data warehouse environments
where you're more likely to have to sequential scan a table. It would be
interesting to have it so that a sequential scan that will run to
completion also collects stats along the way.
--
Jim Nasby                                            jim@nasby.net
EnterpriseDB      http://enterprisedb.com      512.569.9461 (cell)

pgsql-performance by date:

Previous
From: Brendan Curran
Date:
Subject: Re: Scrub one large table against another (vmstat output)
Next
From: "Jim C. Nasby"
Date:
Subject: Re: Scrub one large table against another