Re: LIMIT causes planner to do Index Scan using a less optimal index

From: Robert Haas <robertmhaas(at)gmail(dot)com>
To: Joel Jacobson <joel(at)gluefinance(dot)com>
Cc: Sherry(dot)CTR(dot)Zhu(at)faa(dot)gov, pgsql-performance(at)postgresql(dot)org
Subject: Re: LIMIT causes planner to do Index Scan using a less optimal index
Date: 2010-04-07 00:22:06
Message-ID: n2g603c8f071004061722ja3a5d32x2e9738eb402b19d0@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-performance

On Tue, Apr 6, 2010 at 6:30 PM, Joel Jacobson <joel(at)gluefinance(dot)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

In response to

Browse pgsql-performance by date

  From Date Subject
Next Message norn 2010-04-07 00:42:34 significant slow down with various LIMIT
Previous Message Joel Jacobson 2010-04-06 22:30:17 Re: LIMIT causes planner to do Index Scan using a less optimal index