Using Perl in PostgreSQL
Subject:   Performance
Date:   2005-11-15 02:20:12
From:   brunorc
How about performance? I've built a realtime billing system on the top of PostgreSQL 7.4, but PL/PGSQL triggers were so slow, I had to rewrite everything in C. The speed gain was really big - C triggers were about 20-30 times faster. So, how fast is Perl?
Full Threads Oldest First

Showing messages 1 through 1 of 1.

  • Performance
    2005-11-15 05:55:04  oicu [View]

    I have not benchmarked it. C triggers are probably always going to outperform anything else, not least because the language handlers for other languages need to perform some glue operations. My instict would be that perl might perform better than PL/PGSQL, and it might not, but in any case is still likely to be slower than C.

    That said, perl performance is adequate for many purposes. And even if you find you eventually need to write your triggers in C, it might work well to prototype in perl.

    I would be interested to see any test results.