Re: [GENERAL] best practise/pattern for large OR / LIKE searches

2009-08-30 Thread Jasen Betts
On 2009-08-26, Ries van Twisk p...@rvt.dds.nl wrote: --Apple-Mail-1173-222712773 Content-Type: text/plain; charset=US-ASCII; format=flowed; delsp=yes Content-Transfer-Encoding: 7bit Hey All, I am wondering if there is a common pattern for these sort of queries :

Re: [GENERAL] best practise/pattern for large OR / LIKE searches

2009-08-30 Thread Pavel Stehule
Hello regex is compiled to a finite state machine and then the datanumber column is scanned in a single pass (for each row) Searches are currently taking to long and we would like to optimize them, but before we dive into our own solution we where wondering if there already common solutions

Re: [GENERAL] best practise/pattern for large OR / LIKE searches

2009-08-26 Thread Pavel Stehule
Hello one year ago there was proposal for index support for LIKE %some%. The problem was extreme size of index size. I thing so you can write own C function, that can check string faster than repeated LIKE some like SELECT * FROM tbl WHERE contains(datanumber, '12345','54321',) regards

Re: [GENERAL] best practise/pattern for large OR / LIKE searches

2009-08-26 Thread tv
Hi Pavel, can you provide some link or other directions to the proposal? I guess it was posted to this list or somewhere else? Tomas Hello one year ago there was proposal for index support for LIKE %some%. The problem was extreme size of index size. I thing so you can write own C

Re: [GENERAL] best practise/pattern for large OR / LIKE searches

2009-08-26 Thread Pavel Stehule
2009/8/26 t...@fuzzy.cz: Hi Pavel, can you provide some link or other directions to the proposal? I guess it was posted to this list or somewhere else? Please, ask to Oleg Bartunov http://www.sai.msu.su/~megera/wiki/wildspeed regards Pavel Stehule Tomas Hello one year ago there was

Re: [GENERAL] best practise/pattern for large OR / LIKE searches

2009-08-26 Thread Ries van Twisk
The wildspeed function seems to be what I was looking for. an dI remember that I have seen it before on the list... just I couldn't remember names or anything... Ries On Aug 26, 2009, at 7:28 AM, Pavel Stehule wrote: 2009/8/26 t...@fuzzy.cz: Hi Pavel, can you provide some link or

Re: [GENERAL] best practise/pattern for large OR / LIKE searches

2009-08-26 Thread Christophe Pettus
SELECT * FROM tbl WHERE datanumber LIKE '%12345%' OR LIKE '%54321%' OR LIKE '%8766%' OR LIKE '%009%', .. The number of OR/LIKES are in the order of 50-100 items... the table tbl is a couple of million rows. Are the fixed strings in the wildcards words (i.e., are they completely

[GENERAL] best practise/pattern for large OR / LIKE searches

2009-08-25 Thread Ries van Twisk
Hey All, I am wondering if there is a common pattern for these sort of queries : SELECT * FROM tbl WHERE datanumber LIKE '%12345%' OR LIKE '%54321%' OR LIKE '%8766%' OR LIKE '%009%', .. The number of OR/LIKES are in the order of 50-100 items... the table tbl is a couple of million rows.