Search Postgresql Archives

Re: drop view and recreate - for sync

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Fri, Oct 23, 2009 at 6:44 PM, Sydney Puente <sydneypuente@xxxxxxxxx> wrote:
> Ah I see what you mean - thanks very much that is v helpful!
> Yes the copy will be read-only.
> Will have 3 tables of data, being read (readonly) and in the background
> Will have 3 shadow tables populated from an unreliable db over an unreliable
> network.
> not quite sure how I can "insert all the rows" in sql.
> have postgres 8.03 BTW.
>

If your network is unreliable, then perhaps the thing to do is have
your program first fetch all the new data over that network into tab
delimited files, one per table.  Then to insert all your data, just
use the "COPY" command in postgres to read it all as one hunk of data.
 This will be your fastest, most reliable way of loading the data in
minimal time.  Your only other option is to issue 100,000 "INSERT"
statements, which will take much longer.

-- 
Sent via pgsql-general mailing list (pgsql-general@xxxxxxxxxxxxxx)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]
  Powered by Linux