Re: Index question on postgres - Mailing list pgsql-general

From Scott Marlowe
Subject Re: Index question on postgres
Date
Msg-id dcc563d11001072015x5690f85ap919cf9bedf68e16d@mail.gmail.com
Whole thread Raw
In response to Index question on postgres  (akp geek <akpgeek@gmail.com>)
List pgsql-general
On Thu, Jan 7, 2010 at 9:11 PM, akp geek <akpgeek@gmail.com> wrote:
> Hi All -
>                I have query in production and test. The tables in both the
> environment has the same structure ,indexes and constraints. But the in the
> test and the prod the explain plan is totally different. In test environment
> the query is taking long time and noticed that indexes are not being
> utilized ? I am not able to figure it  Can you please share your thoughts?

Assuming you've got the same data in both servers, or data that's at
least similar enough to get the same query plan then it's likely that
the test db needs analyzing or vacuuming.  If you run the same query
on each machine with explain analyze, what do you get?

i.e.:

explain analyze select ... (rest of your query here)

pgsql-general by date:

Previous
From: "Dann Corbit"
Date:
Subject: Re: Index question on postgres
Next
From: akp geek
Date:
Subject: Re: Index question on postgres