Re: The optimizer is too smart for me - How can I trick it?

From: Martijn van Oosterhout <kleptog(at)svana(dot)org>
To: Peter Vanderborght <peter(dot)vanderborght(at)taatu(dot)com>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: The optimizer is too smart for me - How can I trick it?
Date: 2008-05-30 16:30:21
Message-ID: 20080530163021.GC18339@svana.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On Fri, May 30, 2008 at 10:49:21AM +0200, Peter Vanderborght wrote:
> What can I do to tell the optimizer to keep its hands off my query or at
> least get it to not optimize?

The usual trick is you put an OFFSET 0 in the subquery, which prevents
the optimiser from pulling it up.

Have a nice day.
--
Martijn van Oosterhout <kleptog(at)svana(dot)org> http://svana.org/kleptog/
> Please line up in a tree and maintain the heap invariant while
> boarding. Thank you for flying nlogn airlines.

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Scott Marlowe 2008-05-30 16:57:19 Re: Query planning configuration and solid state drives
Previous Message PJ 2008-05-30 15:58:43 phpeclipse debugging & setup