Re: 7.3 Prepared statements
Bruce Momjian <pgman@candle.pha.pa.us>
From: Bruce Momjian <pgman@candle.pha.pa.us>
To: Francisco J Reyes <fran@natserv.net>
Cc: Neil Conway <neilc@samurai.com>, Ericson Smith <eric@did-it.com>, Postgresql General <pgsql-general@postgresql.org>
Date: 2003-01-03T03:09:14Z
Lists: pgsql-general
A view is just syntaxic sugar added to a query that references the view. A preparted statement actually saves the execution plan for repeated execution. --------------------------------------------------------------------------- Francisco J Reyes wrote: > On 17 Dec 2002, Neil Conway wrote: > > > On Tue, 2002-12-17 at 10:19, Ericson Smith wrote: > > > 1. What is the lifetime of the plan created? > > > > >From the PREPARE reference page: > > > > Prepared queries are stored locally (in the current backend), and only > > exist for the duration of the current database session. > > What is the difference/advantage between a prepared query and a view? > > > ---------------------------(end of broadcast)--------------------------- > TIP 4: Don't 'kill -9' the postmaster > -- Bruce Momjian | http://candle.pha.pa.us pgman@candle.pha.pa.us | (610) 359-1001 + If your life is a hard drive, | 13 Roberts Road + Christ can be your backup. | Newtown Square, Pennsylvania 19073