Re: Statistics collection question

From: Alvaro Herrera <alvherre(at)commandprompt(dot)com>
To: Phoenix Kiula <phoenix(dot)kiula(at)gmail(dot)com>
Cc: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, Postgres General <pgsql-general(at)postgresql(dot)org>
Subject: Re: Statistics collection question
Date: 2007-09-03 15:34:13
Message-ID: 20070903153412.GA10282@alvh.no-ip.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Phoenix Kiula escribió:
> On 03/09/07, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> wrote:
> > "Phoenix Kiula" <phoenix(dot)kiula(at)gmail(dot)com> writes:
>
> > most_common_vals will (and should) be empty if there aren't actually any
> > common values, but aren't you getting a histogram? Exactly what
> > performance do you think will be improved?
>
>
> Lots of posts here in reponse to performance question have the
> recommendation "increase the stats on that column". From whatever
> succint reading is made available on the postgres site, I gather that
> this aids the planner in getting some info about some of the data. Am
> I missing something here, or totally off-base?
>
> The issue is that I don't quite get why MySQL can fetch one indexed
> row (i.e., SQL that ends with a very simple "WHERE indexed_column =
> 'constant' ") in a matter of milliseconds, but PgSQL is taking 5 to 6
> seconds on an average at least for the first time. I use RAPTOR 15K
> drives, they're not SCSI but they're not exactly "cheap disks" either.
> And I have 4GB RAM. The explain select shows that index is being
> used!

Let's see the explain output? I doubt your games with stats have
anything to do with it. Maybe it is having to scan a lot of dead tuples
or something like that.

--
Alvaro Herrera http://www.CommandPrompt.com/
The PostgreSQL Company - Command Prompt, Inc.

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Alban Hertroys 2007-09-03 15:40:41 Re: Statistics collection question
Previous Message Phoenix Kiula 2007-09-03 15:24:39 Re: Statistics collection question