pg.ddx.io  pgsql-performance@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Robert Haas <robertmhaas@gmail.com>
To: Joel Jacobson <joel@gluefinance.com>
Cc: Sherry.CTR.Zhu@faa.gov
Cc: pgsql-performance@postgresql.org
Subject: Re: LIMIT causes planner to do Index Scan using a less optimal index
Date: Tue, 6 Apr 2010 20:22:06 -0400
Message-ID: <n2g603c8f071004061722ja3a5d32x2e9738eb402b19d0@mail.gmail.com> (raw)
In-Reply-To: <o2x8bdec0841004061530g672b7873l9c0bf041569c87ce@mail.gmail.com>
References: <OF5F73A084.4CC92971-ON852576FD.00699450-852576FD.00699A9E@LocalDomain>
	<OF25CDEB33.E5240CF8-ON852576FD.0069C312-852576FD.0069D841@faa.gov>
	<o2x8bdec0841004061530g672b7873l9c0bf041569c87ce@mail.gmail.com>

On Tue, Apr 6, 2010 at 6:30 PM, Joel Jacobson <joel@gluefinance.com> wrote:

> Actually, swapping the order of the conditions did in fact make some
> difference, strange.
>
> I ran the query a couple of times for each variation to see if the
> difference in speed was just a coincidence or a pattern. Looks like the
> speed really is different.
>

Wow.  That's very surprising to me...

...Robert

view thread (11+ messages)  latest in thread

Message-ID: <n2g603c8f071004061722ja3a5d32x2e9738eb402b19d0@mail.gmail.com>
Permalink:  ../n2g603c8f071004061722ja3a5d32x2e9738eb402b19d0@mail.gmail.com/
Also on:    postgresql.org/message-id/n2g603c8f071004061722ja3a5d32x2e9738eb402b19d0@mail.gmail.com

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-performance@postgresql.org
  Cc: robertmhaas@gmail.com, joel@gluefinance.com, Sherry.CTR.Zhu@faa.gov
  Subject: Re: LIMIT causes planner to do Index Scan using a less optimal index
  In-Reply-To: <n2g603c8f071004061722ja3a5d32x2e9738eb402b19d0@mail.gmail.com>
  References: <OF5F73A084.4CC92971-ON852576FD.00699450-852576FD.00699A9E@LocalDomain> <OF25CDEB33.E5240CF8-ON852576FD.0069C312-852576FD.0069D841@faa.gov> <o2x8bdec0841004061530g672b7873l9c0bf041569c87ce@mail.gmail.com> <n2g603c8f071004061722ja3a5d32x2e9738eb402b19d0@mail.gmail.com>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox