Re: multiple joins + Order by + LIMIT query performance issue

From: "Scott Marlowe" <scott(dot)marlowe(at)gmail(dot)com>
To: "Antoine Baudoux" <ab(at)taktik(dot)be>
Cc: "Shaun Thomas" <sthomas(at)leapfrogonline(dot)com>, "pgsql-performance(at)postgresql(dot)org" <pgsql-performance(at)postgresql(dot)org>
Subject: Re: multiple joins + Order by + LIMIT query performance issue
Date: 2008-05-09 07:53:18
Message-ID: dcc563d10805090053l2075c4acra2925264040e808b@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-performance

On Fri, May 9, 2008 at 1:18 AM, Antoine Baudoux <ab(at)taktik(dot)be> wrote:
> Ok, I've tried everything, and the planner keeps choosing index scans when
> it shouldnt.
>
> Is there a way to disable index scans?

You can use "set enable_indexscan off;" as the first command I've had
one or two reporting queries in the past that it was a necessity to do
that before running certain queries on very large datasets where a seq
scan would kill performance.

In response to

Browse pgsql-performance by date

  From Date Subject
Next Message Frank Dekervel 2008-05-09 08:09:46 "append" takes a lot of time in a query
Previous Message Antoine Baudoux 2008-05-09 07:18:39 Re: multiple joins + Order by + LIMIT query performance issue