
Tom, let me know what caches you want on pg_statistics, or if you would
prefer to do it yourself, instructions are at the top of syscache.c.

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

Tue, 23 Nov 1999 19:44:02 -0500 (EST)
Bruce Momjian <pgman@candle.pha.pa.us>
Cache on pg_statistics
Bruce Momjian <pgman@candle.pha.pa.us> writes:
> Tom, let me know what caches you want on pg_statistics, or if you would
> prefer to do it yourself, instructions are at the top of syscache.c.

AFAIK the only index we need is one on starelid + staattnum.  If you
have the time, please put it in and teach getattstatistics() in
backend/utils/adt/selfuncs.c to use it.  That seems to be the only
place that reads pg_statistic.

If you wanted to include staop as a third column, then the index could
be UNIQUE.  (We don't actually use staop at the moment, but I think it
should be left in place for possible future use.)

vacuum.c may also need to be taught to fill the index...

			regards, tom lane

Wed, 24 Nov 1999 01:16:27 -0500
Tom Lane <tgl@sss.pgh.pa.us>
Re: [HACKERS] Cache on pg_statistics 
> Bruce Momjian <pgman@candle.pha.pa.us> writes:
> > Tom, let me know what caches you want on pg_statistics, or if you would
> > prefer to do it yourself, instructions are at the top of syscache.c.
> 
> AFAIK the only index we need is one on starelid + staattnum.  If you
> have the time, please put it in and teach getattstatistics() in
> backend/utils/adt/selfuncs.c to use it.  That seems to be the only
> place that reads pg_statistic.
> 
> If you wanted to include staop as a third column, then the index could
> be UNIQUE.  (We don't actually use staop at the moment, but I think it
> should be left in place for possible future use.)
> 
> vacuum.c may also need to be taught to fill the index...

Done.  Let me know how it works.  I had to add selop param to the
function getattstatistics() because I needed it to find the cache entry
because that field is in the cache.

Not sure how to test if it is working.

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

Wed, 24 Nov 1999 19:21:07 -0500 (EST)
Bruce Momjian <pgman@candle.pha.pa.us>
Re: [HACKERS] Cache on pg_statistics