On Mon, 23 Mar 2009 03:30:09 -0600
Scott Marlowe <scott.marlowe@gmail.com> wrote:
> > I think pg_query_params should make a difference between floats
> > and integers and signal an error if you pass float where
> > integers are expected... but I'm not sure.
> > Not really a security concern, but an early warning for some
> > mistake.
> So, what are the performance implications? Do both methods get
> planned / perform the same on the db side?
I don't think there is any appreciable advantage. Maybe all the
stuff ala fprint perform better in C rather than building up a
string concatenating and escaping in php.
Still I wouldn't consider it a first source of slowdown.
For making a difference in plan management you've to use another
family of functions pg_prepare/pg_execute.
I'm not an expert but not every time caching plans is what you'd like
to do.
--
Ivan Sergio Borgonovo
http://www.webthatworks.it