pg.ddx.io  pgsql-performance@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Vincenzo Romano <vincenzo.romano@gmail.com>
To: Dave Dutcher <dave@tridecap.com>
Cc: pgsql-performance@postgresql.org
Subject: Re: Weird performance drop
Date: Thu, 5 Apr 2007 23:52:45 +0200
Message-ID: <200704052352.45683.Vincenzo.Romano@gmail.com> (raw)
In-Reply-To: <01ea01c772d8$7b87aca0$2e00a8c0@tridecap.com>
References: <01ea01c772d8$7b87aca0$2e00a8c0@tridecap.com>

On Friday 30 March 2007 16:34 Dave Dutcher wrote:
> > From: pgsql-performance-owner@postgresql.org
> > [mailto:pgsql-performance-owner@postgresql.org] On Behalf Of
> > Vincenzo Romano
> >
> > Is there any "workaround"?
> >
> > In my opinion the later the query planner decisions are taken the more
> > effective they can be.
> > It could be an option for the function (body) to delay any
> > query planner
> > decision.
>
> I think a possible workaround is to use a plpgsql function and the execute
> statement. The docs will have more info.
>
> Dave

Aye sir. It works.

There's not much details into the documentation but the real point is
that the execute command of the PLPg/SQL actually says the DB to delay
the query planning process as late as possible,

I have also managed to build search functions at runtime using the execute
command with a dynamically built text variable.
Complex, error prone but really fast.

-- 
Vincenzo Romano
----
Maybe Computers will never become as intelligent as Humans.
For sure they won't ever become so stupid. [VR-1987]



view thread (5+ messages)

Message-ID: <200704052352.45683.Vincenzo.Romano@gmail.com>
Permalink:  ../200704052352.45683.Vincenzo.Romano@gmail.com/
Also on:    postgresql.org/message-id/200704052352.45683.Vincenzo.Romano@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 using the --to and --cc options:
  reply via email

  To: pgsql-performance@postgresql.org
  Cc: vincenzo.romano@gmail.com, dave@tridecap.com
  Subject: Re: Weird performance drop
  In-Reply-To: <200704052352.45683.Vincenzo.Romano@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