pg.ddx.io pgsql-sql@postgresql.org mailing list archivehelp / color / mirror / Atom feed
Text insert max. size. 2+ messages / 2 participants [nested] [flat]
* Text insert max. size. @ 2003-06-18 12:02 Rudi Starcevic <rudi@oasis.net.au> 0 siblings, 1 reply; 2+ messages in thread From: Rudi Starcevic @ 2003-06-18 12:02 UTC (permalink / raw) To: pgsql-sql Hi, I'm doing some planning for storing some xml data and am wondering what is the maximum amount I could insert with one SQL statement. For example if I read an xml file off the hard drive and wanted to store that in a text column what would be the largest file I could insert. How about a 10 KB file ? I guess also each programing language may have limitations too. I this case I'm interested in using PHP. Thank you kindly. Regards Rudi. ^ permalink raw reply [nested|flat] 2+ messages in thread
* Re: Text insert max. size. @ 2003-06-18 13:21 scott.marlowe <scott.marlowe@ihs.com> parent: Rudi Starcevic <rudi@oasis.net.au> 0 siblings, 0 replies; 2+ messages in thread From: scott.marlowe @ 2003-06-18 13:21 UTC (permalink / raw) To: Rudi Starcevic <rudi@oasis.net.au>; +Cc: pgsql-sql On Wed, 18 Jun 2003, Rudi Starcevic wrote: > Hi, > > I'm doing some planning for storing some xml data and am wondering > what is the maximum amount I could insert with one SQL statement. There's no limit to max SQL statement size in postgresql, but practically, you might want a REALLY big machine if you're gonna toss around 100 megs in a single query. > For example if I read an xml file off the hard drive and wanted to store > that in a text column what would be the largest file I could insert. > How about a 10 KB file ? How about 1 gig. Nice limit, eh? :-) > I guess also each programing language may have limitations too. > I this case I'm interested in using PHP. Generally you're gonna hit a limit with the max memory size set in the php.ini file, which defaults to 8 meg max process size before abort. You can crank this up so high your machine starts to swap out. I'd guess PHP is likely limited to some number internally, but I've messed around with a hundred or so megs before. If you wanna build a HUGE SQL query, you're likely better off to use fread and build the query in a file then run it with `psql dbname <myfilehere.sql` than to try and handle it in memory. But for 10k, you won't have to worry. Even 10 or 100 megs is doable if you're willing to reconfigure php to handle larger amounts of memory. ^ permalink raw reply [nested|flat] 2+ messages in thread
end of thread, other threads:[~2003-06-18 13:21 UTC | newest] Thread overview: 2+ messages (download: mbox mbox.gz follow: Atom feed) -- links below jump to the message on this page -- 2003-06-18 12:02 Text insert max. size. Rudi Starcevic <rudi@oasis.net.au> 2003-06-18 13:21 ` scott.marlowe <scott.marlowe@ihs.com>
This inbox is served by DDX for PostgreSQL; see mirroring instructions for how to clone and mirror all data and code used for this inbox