Re: Speed of lo_unlink vs. DELETE on BYTEA - Mailing list pgsql-general

From Albe Laurenz
Subject Re: Speed of lo_unlink vs. DELETE on BYTEA
Date
Msg-id D960CB61B694CF459DCFB4B0128514C2049FCE78@exadv11.host.magwien.gv.at
Whole thread Raw
In response to Speed of lo_unlink vs. DELETE on BYTEA  ("Reuven M. Lerner" <reuven@lerner.co.il>)
Responses Re: Speed of lo_unlink vs. DELETE on BYTEA  ("Reuven M. Lerner" <reuven@lerner.co.il>)
List pgsql-general
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
> for us to use BYTEA columns to store the data (which can get into the 20-50 MB range),
> and for us to just depend on ON DELETE CASCADE, rather than a rule?
[followed by dramatic performance numbers]

Could you try with a trigger instead of a rule and see if the performance is better?

Yours,
Laurenz Albe

pgsql-general by date:

Previous
From: Alban Hertroys
Date:
Subject: Re: Query performs badly with materialize node
Next
From: "Stéphane A. Schildknecht"
Date:
Subject: Re: Relative performance of prefix and suffix string matching