[OPEN-ILS-DEV] Optimization for triggers?

hubert depesz lubaczewski depesz at depesz.com
Fri Oct 11 09:05:46 EDT 2013


On czw, paź 10, 2013 at 05:19:22 -0400, Mike Rylander wrote:
> IMO, the 150ms first-call savings is probably not worth it.  Ingesting
> a bib record is expected to take anywhere from 0.1 to 1.0 seconds, and
> is (in the grand scheme of queries, especially by count) relatively
> infrequent.
> However, you noted the problem trigger as
>     bbb_simple_rec_trigger AFTER INSERT OR DELETE OR UPDATE ON
> biblio.record_entry FOR EACH ROW EXECUTE PROCEDURE
> reporter.simple_rec_trigger()

Sorry - obvious copy paste error.
    b_maintain_901 BEFORE INSERT OR UPDATE ON biblio.record_entry FOR EACH ROW EXECUTE PROCEDURE maintain_901()
that's the correct trigger.

The 150ms might be not much, but given that it has to be spent on every (first)
call to given trigger, in every backend - I would say that it could be worth
it. Also - it was 150ms on (otherwise idle) dev machine.

Best regards,

depesz



More information about the Open-ils-dev mailing list