Re: [HACKERS] TODO item: Implement Boyer-Moore searching in LIKE queries

2016-08-12 Thread Tom Lane
Karan Sikka writes: >> Having said that, I've had a bee in my bonnet for a long time about >> removing per-row setup cost for repetitive regex matches, and >> whatever infrastructure that needs would work for this too. > What are the per-row setup costs for regex matches? Well, they're pretty da

Re: [HACKERS] TODO item: Implement Boyer-Moore searching in LIKE queries

2016-08-12 Thread Karan Sikka
> Having said that, I've had a bee in my bonnet for a long time about > removing per-row setup cost for repetitive regex matches, and > whatever infrastructure that needs would work for this too. What are the per-row setup costs for regex matches? I looked at `regexp.c` and saw: ``` /* * We cach

Re: [HACKERS] TODO item: Implement Boyer-Moore searching in LIKE queries

2016-08-02 Thread Tom Lane
Karan Sikka writes: > Just for the record, I'm leaning to the side of "not worth it". My > thoughts are, if you are at a scale where you care about this 20% > speedup, you would want to go all the way to an indexed structure, > because the gains you would realize would exceed 20%, and 20% may not

Re: [HACKERS] TODO item: Implement Boyer-Moore searching in LIKE queries

2016-08-02 Thread Robert Haas
On Tue, Aug 2, 2016 at 1:56 PM, Alvaro Herrera wrote: >> > How desirable is this feature? To begin answering that question, >> > I did some initial benchmarking with an English text corpus to find how >> > much >> > faster BMH (Boyer-Moore-Horspool) would be compared to LIKE, and the >> > result

Re: [HACKERS] TODO item: Implement Boyer-Moore searching in LIKE queries

2016-08-02 Thread Karan Sikka
Yeah, you make a fair point. I was hoping more people would chime in with strong opinions to make the decision easier, but perhaps the lack of noise indicates this is a low-pri feature. I will ask around in my coworker circles to see what they think, could you do the same? Just for the record, I

Re: [HACKERS] TODO item: Implement Boyer-Moore searching in LIKE queries

2016-08-02 Thread Alvaro Herrera
Robert Haas wrote: > On Mon, Aug 1, 2016 at 1:19 PM, Karan Sikka wrote: > > Following the patch to implement strpos with Boyer-Moore-Horspool, > > it was proposed we bring BMH to LIKE as well. > > > > Original thread: > > https://www.postgresql.org/message-id/flat/27645.1220635769%40sss.pgh.pa.us#

Re: [HACKERS] TODO item: Implement Boyer-Moore searching in LIKE queries

2016-08-01 Thread Robert Haas
On Mon, Aug 1, 2016 at 7:47 PM, Karan Sikka wrote: > I agree, should we remove it from the TODO list? If nobody objects, sure. -- Robert Haas EnterpriseDB: http://www.enterprisedb.com The Enterprise PostgreSQL Company -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To m

Re: [HACKERS] TODO item: Implement Boyer-Moore searching in LIKE queries

2016-08-01 Thread Karan Sikka
I agree, should we remove it from the TODO list? On Mon, Aug 1, 2016 at 6:13 PM, Robert Haas wrote: > On Mon, Aug 1, 2016 at 1:19 PM, Karan Sikka wrote: > > Following the patch to implement strpos with Boyer-Moore-Horspool, > > it was proposed we bring BMH to LIKE as well. > > > > Original thre

Re: [HACKERS] TODO item: Implement Boyer-Moore searching in LIKE queries

2016-08-01 Thread Robert Haas
On Mon, Aug 1, 2016 at 1:19 PM, Karan Sikka wrote: > Following the patch to implement strpos with Boyer-Moore-Horspool, > it was proposed we bring BMH to LIKE as well. > > Original thread: > https://www.postgresql.org/message-id/flat/27645.1220635769%40sss.pgh.pa.us#27645.1220635...@sss.pgh.pa.us