Re: [GENERAL] Speed of lo_unlink vs. DELETE on BYTEA

2011-09-25 Thread Eduardo Morras
At 07:43 25/09/2011, Reuven M. Lerner wrote: Hi, everyone. Daniel Verite mailto:dan...@manitou-mail.orgdan...@manitou-mail.org wrote: It would thus appear that there's a slight edge for dumping bytea, but nothing super-amazing. Deleting, however, is still much faster with bytea than

Re: [GENERAL] Speed of lo_unlink vs. DELETE on BYTEA

2011-09-24 Thread Reuven M. Lerner
Hi, everyone.  Daniel Verite dan...@manitou-mail.org wrote: How much bytea are you dumping for it to take only 0.066s? The fact that it takes about the same time than dumping the "empty content" looks very suspicious. On my desktop machine, if I create a

Re: [GENERAL] Speed of lo_unlink vs. DELETE on BYTEA

2011-09-23 Thread Albe Laurenz
Reuven M. Lerner wrote: When a record in the main table is deleted, there is a rule (yes a rule -- not a trigger) in the referencing table that performs a lo_unlink on the associated object. I just want to check that my intuition is correct: Wouldn't it be way faster and more efficient

Re: [GENERAL] Speed of lo_unlink vs. DELETE on BYTEA

2011-09-23 Thread Reuven M. Lerner
Hi, everyone. Albe wrote: Could you try with a trigger instead of a rule and see if the performance is better? Yours, Laurenz Albe Great idea.  I did that, and here are the results for 10,000 records: |   | Delete    |

Re: [GENERAL] Speed of lo_unlink vs. DELETE on BYTEA

2011-09-23 Thread Daniel Verite
Reuven M. Lerner wrote: 1.1 1,000 records == DeleteDump ---+-+ Empty content 0.172s0.057s bytea 0.488s0.066s large object30.833s 9.275s How much bytea are you dumping

[GENERAL] Speed of lo_unlink vs. DELETE on BYTEA

2011-09-22 Thread Reuven M. Lerner
Hi, everyone. I'm working with someone who has a database application currently running under PostgreSQL 8.3.  Among other things, there is a main table that is referenced by a number of other tables via a foreign key.  One of those tables has a field of type

Re: [GENERAL] Speed of lo_unlink vs. DELETE on BYTEA

2011-09-22 Thread Reuven M. Lerner
Hi again, everyone.  I'm replying to my own posting, to add some information: I decided to do some of my own benchmarking.  And if my benchmarks are at all accurate, then I'm left wondering why people use large objects at all, given their clunky API and their extremely