From: | DeJuan Jackson <djackson(at)speedfc(dot)com> |
---|---|
To: | "Joshua D(dot) Drake" <jd(at)commandprompt(dot)com>, pgsql-php(at)postgresql(dot)org |
Subject: | Re: PHP and COPY |
Date: | 2003-08-15 19:08:01 |
Message-ID: | 3F3D2F91.9000200@speedfc.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-php |
such as?
To answer your question. I have a order system on my local Postgres
(for multiple clients 50+), and need to have an offsite independent
database to drive orders for a website (for one client).
None of the replication solutions I have seen (at a resonable price)
allow me to limit the data being replicated by a specific field (which I
must do from a liability standpoint), so I'm rolling my own replication
using php as the scripting language. I've got the data being
transferred using inserts just fine, but I would suspect a 50-300%
improvement in transfer speed if I could resort to COPY instead (I'm
inserting records in transactions of 500 rows each for testing). One of
the tables that I need to replicate is a Multi-Gig table (which is about
the same size as all the others combined).
Joshua D. Drake wrote:
> Hello,
>
> Why in the world would you want to do this? It seems that there
> should be a better way.
>
> Sincerely,
>
> Joshua Drake
>
> DeJuan Jackson wrote:
>
>> Does anyone know how to execute a COPY from PHP?
>> I keep getting parse errors on all the data.
>>
>> PHP 4.3.2
>> PostgreSQL 7.3.4
>>
>> example:
>>
>> CREATE table tmp(data text);
>>
>> COPY tmp FROM STDIN;
>> test1
>> test2
>> test3
>> \.
>>
>>
>>
>> ---------------------------(end of broadcast)---------------------------
>> TIP 7: don't forget to increase your free space map settings
>
>
>
From | Date | Subject | |
---|---|---|---|
Next Message | Joshua D. Drake | 2003-08-15 21:58:05 | Re: PHP and COPY |
Previous Message | DeJuan Jackson | 2003-08-15 18:15:57 | PHP and COPY |