Re: Prepared statement already exists - Mailing list pgsql-general

From Sam Mason
Subject Re: Prepared statement already exists
Date
Msg-id 20081121141946.GV2459@frubble.xen.chris-lamb.co.uk
Whole thread Raw
In response to Re: Prepared statement already exists  (WireSpot <wirespot@gmail.com>)
List pgsql-general
On Fri, Nov 21, 2008 at 09:55:11AM +0200, WireSpot wrote:
> What would make it all the way better was if the database would do
> that last step for you as well: automatically recognize statements
> that do the same thing and return the already existing handle.

This is somewhat difficult; things to consider are different data
distributions (i.e. the optimal plan changes depending on if you're
searching for common vs. rare values) changes to schema (table foo and
bar are now called the opposite) and various other issues.  It would of
course be possible for PG to do this, it's just getting it all correct
and it being a win in the common case is difficult.


  Sam

pgsql-general by date:

Previous
From: Rafael Martinez
Date:
Subject: Re: Using Postgres to store high volume streams of sensor readings
Next
From: Sam Mason
Date:
Subject: Re: Postgres mail list traffic over time