I've been enjoying pqxx / postgres over the last few weeks and have come across my first stumbling block.  I need to write blobs of binary (think media) into the database.   My blobs are generally between 40KB to 120KB.  I've searched the internet and the postgres/pqxx sites with varied success.  So far, I haven't been very successful.  First, I haven't seen anything that gives detailed information about whether I should be using large objects / oids or the bytea / binary type.  The documentation is vague -- generally stating, "for big files go large objects".  What does that mean?  Are my blobs big?  The nature of my transactions are that I'll be querying these objects very rarely, but will be inserting them in the neighborhood of 50 objects / second -- does this type of activity favor one data type over the other? 

I was hoping to run load tests both ways but so far, I've been attempting large objects with prepare statements with little success.  Anyone have any good working examples of either data type (presumably in conjunction with prepared types (assuming they provide significant performance improvement on repeated calls)?

Thanks in advance for any information / help!

Rich Wardwell
Software Developer (Java, C++), Mac Fanatic






_______________________________________________
Libpqxx-general mailing list
[email protected]
http://gborg.postgresql.org/mailman/listinfo/libpqxx-general

Reply via email to