pg.ddx.io  pgsql-sql@postgresql.org mailing list archive  
help / color / mirror / Atom feed
Table size limit?
2+ messages / 2 participants
[nested] [flat]

* Table size limit?
@ 1999-08-12 13:58 Mike Field <mike@fieldco.com>
  1999-08-12 14:12 ` Re: [SQL] Table size limit? Tom Lane <tgl@sss.pgh.pa.us>
  0 siblings, 1 reply; 2+ messages in thread

From: Mike Field @ 1999-08-12 13:58 UTC (permalink / raw)
  To: pgsql-sql

Hi-

I'm inserting documents of around 80K each into a table - I split up the content into chunks of 8K each (I use a web interface with PHP), and insert the chunks into the following fields:

docid, content1, content2, content3, content4, ... , content10

(content fields are of type 'text')

Question:  will I ever run out of space in my table?  I'll have about 450 documents to start, then it'll grow indefinitely.  

My other option, from what I hear, is to just have a field for each document with the URL of the file (either .txt or .html or whatever).  Do you recommend this option over putting the content directly into the dbase table? 

Please let me know.
Thanks,
Mike

mike@fieldco.com

^ permalink  raw  reply  [nested|flat] 2+ messages in thread

* Re: [SQL] Table size limit?
  1999-08-12 13:58 Table size limit? Mike Field <mike@fieldco.com>
@ 1999-08-12 14:12 ` Tom Lane <tgl@sss.pgh.pa.us>
  0 siblings, 0 replies; 2+ messages in thread

From: Tom Lane @ 1999-08-12 14:12 UTC (permalink / raw)
  To: Mike Field <mike@fieldco.com>; +Cc: pgsql-sql

"Mike Field" <mike@fieldco.com> writes:
> I'm inserting documents of around 80K each into a table - I split up the =
> content into chunks of 8K each (I use a web interface with PHP), and =
> insert the chunks into the following fields:
> docid, content1, content2, content3, content4, ... , content10

That will not work --- the 8K limitation is on the total size of a tuple
(record), not on the size of individual fields in it.  You could make a
table with fields "docid", "partno", "content" and then insert the data
of a document into multiple records with the same "docid" and varying
"partno".  It's a pain though.  I hope to see the 8K/tuple limitation go
away in the next release or two.

> Question:  will I ever run out of space in my table?  I'll have about =
> 450 documents to start, then it'll grow indefinitely. =20

The total size of the table is not a problem --- you'll run out of disk
space first.

> My other option, from what I hear, is to just have a field for each
> document with the URL of the file (either .txt or .html or whatever).

Yes, you could store the text in external files and just refer to those
files in the DB entries.  Not a real satisfactory solution, but it might
do as a workaround.  A variant on this is to keep the text in "large
objects" within the SQL DB, but those are hard to use; worse, they're
not real efficient if you have a lot of 'em.

			regards, tom lane



^ permalink  raw  reply  [nested|flat] 2+ messages in thread


end of thread, other threads:[~1999-08-12 14:12 UTC | newest]

Thread overview: 2+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
1999-08-12 13:58 Table size limit? Mike Field <mike@fieldco.com>
1999-08-12 14:12 ` Tom Lane <tgl@sss.pgh.pa.us>

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