3 ms·
An in-progress task, that I really hope will not be a failure, but that has most of the typical hallmarks of my usual "oh, here's a technical thing I'd really l
by jka 4y ago
An in-progress task, that I really hope will not be a failure, but that has most of the typical hallmarks of my usual "oh, here's a technical thing I'd really like to see accomplished and will attempt, but that, if I'm honest, is probably beyond my focus and capability to achieve":
I think there are opportunities in PostgreSQL to improve the performance of multi-string pattern matching (essentially, queries that contain a LIKE comparison against a pattern that contains multiple wildcards/placeholders).
There's some work-in-progress[1] by another person to implement Boyer-Moore[2] string search, and that'll be a good improvement I expect. I did some digging into the state-of-the-art research-wise, and found a paper[3] that presents results that improve on Boyer-Moore, and that's what I'd like to try implementing.
I have the existing Boyer-Moore patch applied locally and compiling, and have begun thinking about how to systematically benchmark and performance-test changes (ideally I want to get to the point where I have a strong understanding of my own implementation and can rapidly iterate on that with support from performance tests). But it seems to be taking me a long time to achieve progress, and my guess is that I'll be distracted by other tasks before completing it.
(it's purely a personal objective; I think it'd be very cool to potentially increase the performance of PostgreSQL and many applications that depend on it)
[1] - https://www.postgresql.org/message-id/CAO2GH9Ekvcj19ihQyjk_S6RUjPHADhUfPQBU0gRMs4qVfk12Aw%40mail.gmail.com https://www.postgresql.org/message-id/CAO2GH9Ekvcj19ihQyjk_S...
[2] - https://en.wikipedia.org/wiki/Boyer-Moore_string-search_algorithm https://en.wikipedia.org/wiki/Boyer-Moore_string-search_algo...
[3] - https://dl.acm.org/doi/10.1145/1005813.1041513 https://dl.acm.org/doi/10.1145/1005813.1041513