Re: [Legacy Email] Re: ILIKE vs. upper/lower with PostgreSQL

2017-12-16 Thread Reid Thompson
On Fri, 2017-12-15 at 18:49 +, Hugi Thordarson wrote: > [EXTERNAL SOURCE] > > > > > On 15 Dec 2017, at 16:08, Andrus Adamchik wrote: > > > > > On Dec 15, 2017, at 11:00 AM, Musall, Maik wrote: > > > > > > ILIKE is certainly useful for full text searches with CLOB/TEXT values > > > and i

Re: ILIKE vs. upper/lower with PostgreSQL

2017-12-16 Thread Musall, Maik
> Am 15.12.2017 um 19:49 schrieb Hugi Thordarson : > >> On 15 Dec 2017, at 16:08, Andrus Adamchik wrote: >> >>> On Dec 15, 2017, at 11:00 AM, Musall, Maik wrote: >>> >>> ILIKE is certainly useful for full text searches with CLOB/TEXT values and >>> in combination with GiST/GIN indexes, but I

Re: ILIKE vs. upper/lower with PostgreSQL

2017-12-15 Thread Hugi Thordarson
> On 15 Dec 2017, at 16:08, Andrus Adamchik wrote: > >> On Dec 15, 2017, at 11:00 AM, Musall, Maik wrote: >> >> ILIKE is certainly useful for full text searches with CLOB/TEXT values and >> in combination with GiST/GIN indexes, but IMHO not for regular >> case-insensitive >> queries using b-

Re: ILIKE vs. upper/lower with PostgreSQL

2017-12-15 Thread Andrus Adamchik
> On Dec 15, 2017, at 11:00 AM, Musall, Maik wrote: > > ILIKE is certainly useful for full text searches with CLOB/TEXT values and in > combination with GiST/GIN indexes, but IMHO not for regular case-insensitive > queries using b-tree indexes. So I'm not sure that > PostgresQualifierTranslat

Re: ILIKE vs. upper/lower with PostgreSQL

2017-12-15 Thread Musall, Maik
Hi Nikita, thanks for the reponse. However, changing hundreds of expressions to something less elegant isn't really a compelling solution to me. So Hugi (who works on this project with me) solved it by creating a custom alternative to PostgresQualifierTranslator which just omits the ILIKE-relat

Re: ILIKE vs. upper/lower with PostgreSQL

2017-12-15 Thread Nikita Timofeev
Hi, I don't think it will be easy to change Cayenne translator behavior (but still should be possible if necessary). It may be easier to use upper().like() functions instead of likeIgnoreCase() in your case. I.e. you can do something like this: ObjectSelect.query(MyTable.class).where(MyTable

ILIKE vs. upper/lower with PostgreSQL

2017-12-15 Thread Musall, Maik
Hi all, after migrating an EOF application to Cayenne, I noticed many queries running much slower than before and with more load on the database. Turns out that Cayenne generates queries using ILIKE where EOF used to generate UPPER() comparisons. Example: EOF: SELECT * FROM mytable t0 WHER