brian stone <skye0507@xxxxxxxxx> writes: > I have to store binary data in a table, ranging from 512K - 1M. I am getting very poor performance when inserting this data. > create table my_stuff (data bytea); > I then try to insert 10 1M blobs into this table using PQexecParams from C. It takes ~10 seconds to insert the 10 records. > The test is being performed locally so this is not a network issue. If I change the data I send from the client to 1M worth of text, and change the 'my_stuff.data' to TEXT, the same test takes ~2 seconds. Has anyone else seen this performance issue with bytea? How are you transmitting the data exactly? Have you tried using oprofile or some such to identify the culprit? It does sound like escaping could be the issue, except that if you're sending binary parameters as your message suggests (but doesn't actually say) then there shouldn't be any escape processing going on. regards, tom lane