pg.ddx.io  pgsql-sql@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Hannu Krosing <hannu@tm.ee>
To: Achilleus Mantzios <achill@matrix.gatewaynet.com>
Cc: pgsql-sql@postgresql.org
Cc: pgsql-performance@postgresql.org
Cc: pgsql-bugs@postgresql.org
Subject: Re: An unresolved performance problem.
Date: 07 May 2003 16:40:06 +0300
Message-ID: <1052314806.2205.6.camel@fuji.krosing.net> (raw)
In-Reply-To: <Pine.LNX.4.44.0305071359180.27590-100000@matrix.gatewaynet.com>
References: <Pine.LNX.4.44.0305071359180.27590-100000@matrix.gatewaynet.com>

Achilleus Mantzios kirjutas K, 07.05.2003 kell 19:33:
> Hi, few days ago, i posted some really wierd (at least to me)
> situation (maybe a potentian bug) to the performance and bugs list
> and to some core hacker(s) privately as well,
> and i got no response.
> Moreover i asked for some feedback
> in order to understand/fix the problem myself,
> and again received no response.
> 
> What i asked was pretty simple:
> "1. Is it possible that the absense of statistics make the planer produce 
> better plans than in the case of statistcs generated with vacuum 
> analyze/analyze?

Yes, the planner is not perfect, the statistics are just statistics
(based on a random sample), etc..

This question comes up at least once a month on either [PERFORM] or
[HACKERS], search the mailing lists to get more thorough
discussion/explanation.

> 2. If No, i found a bug,

Rather a feature ;-p

> 3. If yes then under what conditions??

if 

1) ANALYZE produced skewed data which was worse than default.

or.

2) some costs are way off for your system (try changing them in
postgresql.conf)

> 4. If no person knows the answer or no hacker wants to dig into the 
> problem then is there a direction i must follow to understand/fix whats 
> going on myself??""

You can sturt by enabling/disabling various scan methods

psqldb# set enable_seqscan to off;
SET


and see what happens, then adjust the weights in postgresql.conf or use
some combination of SETs around critical queries to force the plan you
like.


------------
Hannu




view thread (20+ messages)  latest in thread

Message-ID: <1052314806.2205.6.camel@fuji.krosing.net>
Permalink:  ../1052314806.2205.6.camel@fuji.krosing.net/
Also on:    postgresql.org/message-id/1052314806.2205.6.camel@fuji.krosing.net

 · 

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-sql@postgresql.org
  Cc: hannu@tm.ee, achill@matrix.gatewaynet.com, pgsql-performance@postgresql.org, pgsql-bugs@postgresql.org
  Subject: Re: An unresolved performance problem.
  In-Reply-To: <1052314806.2205.6.camel@fuji.krosing.net>

* 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