Re: Scaling 10 million records in PostgreSQL table

From: Samuel Gendler <sgendler(at)ideasculptor(dot)com>
To: Navaneethan R <nava(at)gridlex(dot)com>
Cc: pgsql-performance(at)postgresql(dot)org
Subject: Re: Scaling 10 million records in PostgreSQL table
Date: 2012-10-09 21:47:07
Message-ID: CAEV0TzD0MpxyZ87jx+DHetfwjF7+5KwMUxZhVyi7OsepvOiBtw@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-performance

On Mon, Oct 8, 2012 at 1:25 PM, Navaneethan R <nava(at)gridlex(dot)com> wrote:

>
> After created the index for WHERE clause "WHERE dealer_id = 270001"..It
> is performing better.I have more dealer ids Should I do it for each
> dealer_id?
>
>
All you've really done is confuse the issue. Please read the wiki page on
how to submit performance questions and actually follow the directions.
Show us the table structure when the query is performing poorly ALONG WITH
explain analyze output, so we can see how the query is being handled by the
db. Adding indexes for just one particular value isn't likely a great
solution unless there's a reason why that value is special or performance
for that value needs to be particularly good. Far better to get at the
root problem of performance issues on that table, whether it is table
bloat, insufficient indexes, invalid statistics, or something else.

In response to

Browse pgsql-performance by date

  From Date Subject
Next Message Daniel Farina 2012-10-09 21:49:04 Re: Scaling 10 million records in PostgreSQL table
Previous Message Shane Hathaway 2012-10-09 21:38:52 Ways to speed up ts_rank