Re: Can you spot the difference?

From: Adrian Klaver <adrian(dot)klaver(at)gmail(dot)com>
To: Moshe Jacobson <moshe(at)neadwerx(dot)com>
Cc: pgsql-general <pgsql-general(at)postgresql(dot)org>
Subject: Re: Can you spot the difference?
Date: 2013-04-16 19:29:55
Message-ID: 516DA6B3.40903@gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On 04/16/2013 12:07 PM, Moshe Jacobson wrote:
> Hi PostgreSQL friends,
>
> I have two databases in the same cluster that are almost identical. One
> is a copy of the other as we are developing some new features in the copy.
>
> My problem is that the exact same simple query performs great in the
> original database ("ises") and dismally in the copy database
> ("ises_coelacanth"). The problem is that in ises, it uses an index scan,
> but in ises_coelacanth it uses a sequential scan:

The difference is that Postgres is coming to alternate conclusions as to
what plan to use. Given that the copy is causing the 'problem', the
question to ask is; did you run ANALYZE on the table once the data was
copied in?

>
> --
> Moshe Jacobson
> Nead Werx, Inc. | Manager of Systems Engineering
> 2323 Cumberland Parkway, Suite 201 | Atlanta, GA 30339
> moshe(at)neadwerx(dot)com <mailto:moshe(at)neadwerx(dot)com> | www.neadwerx.com
> <http://www.neadwerx.com/>
>
> "Quality is not an act, it is a habit." -- Aristotle

--
Adrian Klaver
adrian(dot)klaver(at)gmail(dot)com

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Tom Lane 2013-04-16 19:29:58 Re: Can you spot the difference?
Previous Message Catelli, Mary M 2013-04-16 19:15:28 Postgresql default driver