From: | Andrew McMillan <andrew(at)morphoss(dot)com> |
---|---|
To: | V S P <toreason(at)fastmail(dot)fm> |
Cc: | pgsql-php(at)postgresql(dot)org |
Subject: | Re: [Q] PDO use to bind arrays for insert |
Date: | 2008-11-17 04:05:47 |
Message-ID: | 1226894747.5577.267.camel@happy.mcmillan.net.nz |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-php |
On Sun, 2008-11-16 at 22:01 -0500, V S P wrote:
>
> I think Chris @ dmagick pointed to a raw string functionality
> that -- so I will need to figure out if
> a) it actually saves on parsing
Using the COPY functionality in PostgreSQL does save on parsing,
although an insert of many rows in a single insert statement doesn't
spend any significant amount of it's time parsing the input, and the
query planning only happens once.
If you are really concerned about the performance impacts of an insert,
you might be better advised to feed the row data to a separate process
which handled the actual inserts.
> b) if it will work with PG connection pooling (which I am not
> using yet, but will in the future).
There's no reason why COPY shouldn't work with connection pooling,
unless your connection pooling is trying to understand the statements
deeply on the way through, without understanding PostgreSQL. I can't
think of why someone would write connection pooling that way though!
Certainly it will work fine with pgpool, which is what I would recommend
for connection pooling with PostgreSQL as it is written by someone on
the core team.
Cheers,
Andrew McMillan.
------------------------------------------------------------------------
andrew (AT) morphoss (DOT) com +64(272)DEBIAN
You have a deep interest in all that is artistic.
------------------------------------------------------------------------
From | Date | Subject | |
---|---|---|---|
Next Message | V S P | 2008-11-17 04:26:58 | Re: [Q] PDO use to bind arrays for insert |
Previous Message | V S P | 2008-11-17 03:01:13 | Re: [Q] PDO use to bind arrays for insert |