Re: Optimizing select count query which often takes over 10 seconds - Mailing list pgsql-general

From Alexander Farber
Subject Re: Optimizing select count query which often takes over 10 seconds
Date
Msg-id CAADeyWjvQCyftMvmHyzMMMRCaRKPGWWY7bRYUDQ3qmGhs7s70A@mail.gmail.com
Whole thread Raw
In response to Re: Optimizing select count query which often takes over 10 seconds  (Guillaume Lelarge <guillaume@lelarge.info>)
Responses Re: Optimizing select count query which often takes over 10 seconds  (Guillaume Lelarge <guillaume@lelarge.info>)
Re: Optimizing select count query which often takes over 10 seconds  (Guillaume Lelarge <guillaume@lelarge.info>)
List pgsql-general
Hi -

On Thu, Jan 24, 2013 at 8:12 PM, Guillaume Lelarge
<guillaume@lelarge.info> wrote:
> You should better create an index on pref_money(yw, money). It could
> help you get rid of the seqscan and sort operations.

I've created an index with

# create index pref_money_money_index on pref_money(money desc);

and posted the new EXPLAIN output here:

http://stackoverflow.com/questions/14498974/optimizing-select-count-query-which-often-takes-over-10-seconds

But it doesn't seem to change much or
am I too unexperienced to see the change?

Thanks
Alex


--
Sent via pgsql-general mailing list (pgsql-general@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general


pgsql-general by date:

Previous
From: Rodrigo Pereira da Silva
Date:
Subject: Re: Throttling Streamming Replication
Next
From: Guillaume Lelarge
Date:
Subject: Re: Optimizing select count query which often takes over 10 seconds