pg.ddx.io pgsql-sql@postgresql.org mailing list archivehelp / color / mirror / Atom feed
Large objects - bug? caveat? feature? 2+ messages / 2 participants [nested] [flat]
* Large objects - bug? caveat? feature? @ 1999-04-23 15:04 Justin Long <justinlong@strategicnetwork.org> 1999-04-24 02:58 ` Re: [SQL] Large objects - bug? caveat? feature? Chris Bitmead <chris.bitmead@bigfoot.com> 0 siblings, 1 reply; 2+ messages in thread From: Justin Long @ 1999-04-23 15:04 UTC (permalink / raw) To: pgsql-sql I am using PHP3 with Apache on top of Linux, using beta 2 of PostgreSQL. I have uncovered an interesting (bug/feature?) in the Large Objects. If (using PHP3) you write out, say, a 2,000 byte large object (a text article in this case), and then using an edit routine you replace that 2,000 object with a more concise, edited 1,000-byte document, what you get is the 1,000-bytes of the edit, followed by the final 1,000 bytes of the original 2,000 byte article. In other words, it doesn't shrink the file to the edited size. Secondly, I notice that in my data/base/... area that whenever I create an object it creates a single file on the disk. Does that mean that if I have 100,000 articles in my knowledge base, that it is possible that I will have 100,000 files individual 8-to-10k files on my hard drive? Does Linux suffer degradation in performance when having that many files in a directory? Justin Never retreat. Never surrender. Never cut a deal with a dragon. _______________________________________________________________ Justin Long CIO / Site Editor 616 Station Square Ct Network for Strategic Missions Chesapeake, VA 23320 977 Centerville Trnpk CSB 317 JustinLong@xc.org Va Beach, VA 23463 Check out our site at: http://www.strategicnetwork.org ^ permalink raw reply [nested|flat] 2+ messages in thread
* Re: [SQL] Large objects - bug? caveat? feature? 1999-04-23 15:04 Large objects - bug? caveat? feature? Justin Long <justinlong@strategicnetwork.org> @ 1999-04-24 02:58 ` Chris Bitmead <chris.bitmead@bigfoot.com> 0 siblings, 0 replies; 2+ messages in thread From: Chris Bitmead @ 1999-04-24 02:58 UTC (permalink / raw) To: ; +Cc: pgsql-sql Justin Long wrote: > 2,000 byte article. In other words, it doesn't shrink the file > to the edited size. Does the interface have any equivilent to the UNIX O_TRUNC? > Secondly, I notice that in my data/base/... area that whenever I create an > object it creates a single file on the disk. Does that mean that if I have > 100,000 articles in my knowledge base, that it is possible that I will have > 100,000 files individual 8-to-10k files on my hard drive? It's worse than that I think. I believe you get _two_ files for each large object. Large objects really suck badly. > Does Linux suffer > degradation in performance when having that many files in a > directory? Absolutely does suffer. Even worse, your regular database tables are in the same directory, so they'll suffer too. Another problem, is pgdump doesn't dump large objects so you have to figure out some other backup strategy. -- Chris Bitmead http://www.bigfoot.com/~chris.bitmead mailto:chris.bitmead@bigfoot.com ^ permalink raw reply [nested|flat] 2+ messages in thread
end of thread, other threads:[~1999-04-24 02:58 UTC | newest] Thread overview: 2+ messages (download: mbox mbox.gz follow: Atom feed) -- links below jump to the message on this page -- 1999-04-23 15:04 Large objects - bug? caveat? feature? Justin Long <justinlong@strategicnetwork.org> 1999-04-24 02:58 ` Chris Bitmead <chris.bitmead@bigfoot.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