Re: Prepared statement already exists

From: Sam Mason <sam(at)samason(dot)me(dot)uk>
To: pgsql-general(at)postgresql(dot)org
Subject: Re: Prepared statement already exists
Date: 2008-11-21 14:19:46
Message-ID: 20081121141946.GV2459@frubble.xen.chris-lamb.co.uk
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Sam Mason 2008-11-21 14:33:47 Re: Postgres mail list traffic over time
Previous Message Rafael Martinez 2008-11-21 14:14:38 Re: Using Postgres to store high volume streams of sensor readings