Re: Why should such a simple query over indexed columns be so slow?

From: Alessandro Gagliardi <alessandro(at)path(dot)com>
To: Scott Marlowe <scott(dot)marlowe(at)gmail(dot)com>
Cc: Josh Berkus <josh(at)agliodbs(dot)com>, pgsql-performance(at)postgresql(dot)org
Subject: Re: Why should such a simple query over indexed columns be so slow?
Date: 2012-01-30 21:55:00
Message-ID: CAAB3BBJTQq8LR=RNgJepPhZnRNVPV19AMPgWe_22YeCK-wfzUw@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-performance

I set random_page_cost to 2 (with enable_seqscan on) and get the same
performance I got with enable_seqscan off.
So far so good. Now I just need to figure out how to set it globally. :-/

On Mon, Jan 30, 2012 at 1:45 PM, Scott Marlowe <scott(dot)marlowe(at)gmail(dot)com>wrote:

> On Mon, Jan 30, 2012 at 2:39 PM, Alessandro Gagliardi
> <alessandro(at)path(dot)com> wrote:
> > Looking
> > at
> http://www.postgresql.org/docs/current/static/runtime-config-query.html#GUC-RANDOM-PAGE-COST
> > I wonder if I should try reducing random_page_cost?
> >
>
> Yes try lowering it. Generally speaking, random page cost should
> always be >= seq page cost. Start with a number between 1.5 and 2.0
> to start with and see if that helps. You can make it "sticky" for
> your user or database with alter user or alter database...
>

In response to

Responses

Browse pgsql-performance by date

  From Date Subject
Next Message Scott Marlowe 2012-01-30 22:19:16 Re: Why should such a simple query over indexed columns be so slow?
Previous Message Alessandro Gagliardi 2012-01-30 21:45:35 Re: Why should such a simple query over indexed columns be so slow?