Re: AW: Is stats update during COPY IN really a good idea? - Mailing list pgsql-hackers

From Bruce Momjian
Subject Re: AW: Is stats update during COPY IN really a good idea?
Date
Msg-id 200105221153.f4MBrVU29854@candle.pha.pa.us
Whole thread Raw
In response to AW: Is stats update during COPY IN really a good idea?  (Zeugswetter Andreas SB <ZeugswetterA@wien.spardat.at>)
List pgsql-hackers
[ Charset ISO-8859-1 unsupported, converting... ]
> 
> > We have a TODO item
> >     * Update reltuples in COPY
> > 
> > I was just about to go do this when I realized that it may not be such
> > a hot idea after all.
> 
> Imho it is not a good idea at all. The statistics are a very sensitive area,
> that imho should only be calculated on request. I already don't like the
> statistics that are implicitly created during create index.

OK, if you feel strongly, and Tom does, I will remove the item. 
However, just remember that pg_class already has a row count that we
force in there by default.
test=> create table test (x int);CREATEtest=> select reltuples from pg_class where relname = 'test'; reltuples
-----------     1000(1 row)
 

I was just suggesting we make that accurate if we can, even if we can
make it accurate only 80% of the time.  Once we INSERT, it isn't
accurate anymore anyway.  This is just an estimate, and in my mind, it
doesn't have to be accurate in all cases.

--  Bruce Momjian                        |  http://candle.pha.pa.us pgman@candle.pha.pa.us               |  (610)
853-3000+  If your life is a hard drive,     |  830 Blythe Avenue +  Christ can be your backup.        |  Drexel Hill,
Pennsylvania19026
 


pgsql-hackers by date:

Previous
From: Bruce Momjian
Date:
Subject: Re: Is stats update during COPY IN really a good idea?
Next
From: Zeugswetter Andreas SB
Date:
Subject: AW: AW: Is stats update during COPY IN really a good id ea?