Re: Strange query plan

From: "Dmitry Teslenko" <dteslenko(at)gmail(dot)com>
To: pgsql-general(at)postgresql(dot)org
Subject: Re: Strange query plan
Date: 2008-08-14 14:55:43
Message-ID: 91325fec0808140755v42a95803xda0b03f354fb35c3@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On Thu, Aug 14, 2008 at 18:47, Scott Marlowe <scott(dot)marlowe(at)gmail(dot)com> wrote:
> What does "explain analyze select.... (your query here)" have to say?
>
Expalin analyze says it makes sequential scan on a table table1.

On Thu, Aug 14, 2008 at 18:48, Gauthier, Dave <dave(dot)gauthier(at)intel(dot)com> wrote:
> Try this...
>
> Set default_statistics_target to be 1000 in postgres.conf then reboot
> your pg server. "Analyze" the table. Try the query again.
>
> If that fails, drop the index on (field1, field3) and recreate the other
> way around (field3, field1). Analyze again and try the query.
>
> -dave
I've altered query and swapped field1 and field3 there, in where statement.
Seems that order doesn't matter.

--
A: Because it messes up the order in which people normally read text.
Q: Why is top-posting such a bad thing?
A: Top-posting.
Q: What is the most annoying thing in e-mail?

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Devrim GÜNDÜZ 2008-08-14 15:11:05 Re: Newbie [CentOS 5.2] service postgresql initdb
Previous Message Gauthier, Dave 2008-08-14 14:48:44 Re: Strange query plan