prepare()

From: Tom Allison <tom(at)tacocat(dot)net>
To: General PostgreSQL List <pgsql-general(at)postgresql(dot)org>
Subject: prepare()
Date: 2007-05-29 23:28:14
Message-ID: 51762686-B75E-4B2F-8425-38C0BA06DEE4@tacocat.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Is there an advantage to using something like $dbh->prepare($sql) if
the SQL is going to be run once within the scope of the code? The
code block may be run many times in a minute as in a function call ---

while (<>) {
insert_something($_);
}

Will the prepare statement be cached @ the database even if it's
destroyed in the code/application?

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Naz Gassiep 2007-05-29 23:28:59 TimeZone List
Previous Message Shoaib Mir 2007-05-29 23:26:16 Re: monitor stats