pg.ddx.io  pgsql-performance@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Richard Huxton <dev@archonet.com>
To: Mezei Zoltán <mezei.zoltan@telefor.hu>
Cc: pgsql-performance@postgresql.org
Subject: Re: Deceiding which index to use
Date: Fri, 09 Mar 2007 15:52:23 +0000
Message-ID: <45F182B7.30507@archonet.com> (raw)
In-Reply-To: <45F180D2.5080201@telefor.hu>
References: <45F15F0F.8080403@telefor.hu>
	<45F1715E.1050000@archonet.com>
	<45F174CF.8010302@telefor.hu>
	<45F1775A.8030701@archonet.com>
	<45F179AB.7040000@telefor.hu>
	<45F17B70.60001@archonet.com>
	<45F180D2.5080201@telefor.hu>

Mezei Zoltán wrote:
> Richard Huxton wrote:
>>
>> OK - so the next place to look is the distribution of values for
>> subscriber_id on the output_message_log. Does that have some subscribers
>> with many rows and lots with hardly any?
>>
> Hmm... There are about 1.5k subscribers with 100-200 messages each - all the 
> other 19k has an average of 8.9 messages, most of them having only 1 message. I 
> think that's exactly the situation you mention...

[snip alter table ... set statistics]

> So if I'm correct: this statistics gathering can be fine tuned, and if i set the 
> <num> to 1000 then not only the first 10 subsribers (with most messages) will be 
> stored in pg_stats, but the first 1000? Is 1000 a hard-coded 
> highest-possible-value? I think it would be best to set that to simething like 
> 1800-1900 as I have about that many subscibers with high message count.

There is a cost to increasing the stats values, otherwise it'd already 
be set at 1000. In your case I'm not sure if 100-200 vs 8-9 messages is 
enough to skew things. Only one way to find out...

-- 
   Richard Huxton
   Archonet Ltd



view thread (13+ messages)  latest in thread

Message-ID: <45F182B7.30507@archonet.com>
Permalink:  ../45F182B7.30507@archonet.com/
Also on:    postgresql.org/message-id/45F182B7.30507@archonet.com

 · 

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: pgsql-performance@postgresql.org
  Cc: dev@archonet.com, mezei.zoltan@telefor.hu
  Subject: Re: Deceiding which index to use
  In-Reply-To: <45F182B7.30507@archonet.com>

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

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