September 5th, 2007 by depesz | Tags: , | 4 comments »
Did it help? If yes - maybe you can help me?

thomas reiss just published his follow up to my post about indexed searches in “like ‘%something'" cases.

i don't understand french so i can't tell what exactly he wrote, but i understand c code and graphs 🙂

basically – he wrote c function that does reverse() of strings, and benchmarked it against pl/pgsql and pl/perl versions. of course c version is the fastest, but just take a look at how much faster it is. and how simple it is.

  1. 4 comments

  2. # Acid
    Sep 5, 2007

    I thing that this:

    will help with understunging article

  3. # Thomas Reiss
    Sep 5, 2007

    Hey, thanks for your article. But YOU did the tests against other implentations 😉
    Thanks again!

  4. # Vincent de Phily
    Sep 6, 2007

    I wonder, could that C function be included in stock postgresql ? Or is it a “pointless extension to SQL that should be avoided” ?

    A string reverse is actually pretty usefull (as you demonstrated), and writing the speedy and multibyte-safe version ranks probably far too high for the average admin’s skill / available time.

  5. Sep 6, 2007

    @Vincent de Phily:
    as for “far too high” – now the source is available on web, so it shouldn’t be a big problem.
    as for including in core – talk with thomas or simply mail to pgsql-general or -hackers mailing list with suggestion.

Sorry, comments for this post are disabled.