> 1. I find about 50% database storage overhead in this case. That's not
completely silly, considering this is structured data, but seems a little
high. I don't know >the internal structures well enough to really see
what's happening.
Hmm, the PG docs say to expect data stored in the database to take up %600
(or so) more space..
see: http://postgresql.bteg.net/docs/faq-english.html#4.7
> 2. Why would it be faster than grep? This has to match structured data,
in this case varchar, and not just bytes. It has to worry about
transactions and logs, not >just a stream of data. Besides, in my tests it
is not *that* slow (3 sec, compared with 1/2). Dunno what's up with your
system.
Sure, I'd expect grep to find a string in a semi-large text file faster than
PostgreSQL -- there is a hell of a lot less overhead with grep! :-)
> 3. As you said: With an index it rocks, easily beating grep. Use an
index - it's your friend :-)
Yep yep!
-Mitch