Search Postgresql Archives

Re: psql memory usage when creating delimited files

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

 



On Sep 18 02:57, David Brain wrote:
> >Use COPY instead. (You can also prefer CURSORs in your client
> >applications. See related discussions.)
> 
> Yes, but COPY isn't an option if I need to do:
> 
> 	SELECT * from really_big_table where foo='zebra' order by createddate
> 
> Which is what I really need to do (forgot the where clause in the example).

For an alternative to COPY, IMHO you can create and use a CURSOR with
some help from shell (e.g. a while loop) to form a "FETCH FORWARD ..."
query family.

> Any other workarounds?

AFAIK, you'll be able to use subselects and views in COPY with 8.2
release.


Regards.


[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