Re: Does preparing statements other than selects help performance?

From: Richard Huxton <dev(at)archonet(dot)com>
To: David Goodenough <david(dot)goodenough(at)btconnect(dot)com>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: Does preparing statements other than selects help performance?
Date: 2005-08-05 10:57:48
Message-ID: 42F3462C.3010201@archonet.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

David Goodenough wrote:
> This set me thinking (always dangerous). I can see how a SELECT can be
> helped by preparing the statement, but not really how an INSERT could
> or, other than the SELECT implicit in the WHERE clause on an UPDATE or
> DELETE, how UPDATE or DELETE statements would be helped.
>
> Can anyone enlighten me please?

Well, it does take time to parse/plan even a simple INSERT. But, unless
you are repeating that query many times (e.g. 1000 inserts to bulk-load
a table) I'm not sure you'll notice any gain.

--
Richard Huxton
Archonet Ltd

In response to

Browse pgsql-general by date

  From Date Subject
Next Message David Goodenough 2005-08-05 11:18:24 Re: Does preparing statements other than selects help performance?
Previous Message Martijn van Oosterhout 2005-08-05 10:57:10 Re: Does preparing statements other than selects help performance?