pg.ddx.io pgsql-admin@postgresql.org mailing list archive
help / color / mirror / Atom feedLarge TEXT fields
2+ messages / 2 participants
[nested] [flat]
* Large TEXT fields
@ 2002-08-16 14:44 David F. Skoll <dfs@roaringpenguin.com>
0 siblings, 1 reply; 2+ messages in thread
From: David F. Skoll @ 2002-08-16 14:44 UTC (permalink / raw)
To: pgsql-admin
Hi,
I'm considering building a database with a table which stores entire
e-mail messages, up to around 128kB.
- How does PostgreSQL cope with tables with huge amounts of data in a
TEXT column? Let's say 50,000 rows of e-mail messages with an average
e-mail size of 20kB, with maybe 5% of the messages over 100kB.
- Is it better to use the large-object interface? I'd rather avoid
this as it's a bit clunky.
- Is it better to store the messages as files and have the database
hold filenames? I'd *really* rather not do this...
Regards,
David.
^ permalink raw reply [nested|flat] 2+ messages in thread
* Re: Large TEXT fields
@ 2002-08-16 17:06 Joe Conway <mail@joeconway.com>
parent: David F. Skoll <dfs@roaringpenguin.com>
0 siblings, 0 replies; 2+ messages in thread
From: Joe Conway @ 2002-08-16 17:06 UTC (permalink / raw)
To: David F. Skoll <dfs@roaringpenguin.com>; +Cc: pgsql-admin
David F. Skoll wrote:
> I'm considering building a database with a table which stores entire
> e-mail messages, up to around 128kB.
>
> - How does PostgreSQL cope with tables with huge amounts of data in a
> TEXT column? Let's say 50,000 rows of e-mail messages with an average
> e-mail size of 20kB, with maybe 5% of the messages over 100kB.
What you describe is not what I would call huge, but a lot depends on
your hardware and typical queries of course. Why don't you test it?
As am example, I did this (on a Pentium 833, 512 MB RAM, IDE hard drive,
Red Hat 7.3)
1. create table bigtest(f1 int, f2 text);
2. run script to insert 50000 rows of sequential id, and 130k string
literal (took about 24 minutes)
3. create index bigtest_idx on bigtest(f1); (took about 2 seconds)
4. analyze bigtest; (took about 2 seconds)
5. explain analyze select f1, substr(f2,1,20)
from bigtest where f1 = 33333;
explain analyze select f1, substr(f2,1,20) from bigtest where f1 = 33333;
QUERY PLAN
--------------------------------------------------------------------------------------------------------------------
Index Scan using bigtest_idx on bigtest (cost=0.00..3.01 rows=1
width=36) (actual time=1.66..1.69 rows=1 loops=1)
Index Cond: (f1 = 33333)
Total runtime: 1.83 msec
(3 rows)
HTH,
Joe
^ permalink raw reply [nested|flat] 2+ messages in thread
end of thread, other threads:[~2002-08-16 17:06 UTC | newest]
Thread overview: 2+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2002-08-16 14:44 Large TEXT fields David F. Skoll <dfs@roaringpenguin.com>
2002-08-16 17:06 ` Joe Conway <mail@joeconway.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