All this is prety straight forward. As for the transaction you are crating, is the process of 'split message' actually do on the DB side or are you doing this process on you side? Maybe this is the actual work of splitting the message by the DB that is very slow. /Maybe/ if you do this data-processing on your side, then sending that to the DB will save you time. If you really want that job being done on the server side, you could build yourself an extension module adding a special function that you would call to do the job. Maybe you could win couple cycles... But all that could be confirmed or not by someone else which knows more about PG internals. Best regards. -- Alexandre Leclerc