[rt-devel] extremely slow query in rt 3.0.10 due to ILIKE instead of =

Jesse Vincent jesse at bestpractical.com
Thu May 13 21:36:33 EDT 2004




On Fri, May 14, 2004 at 03:07:24AM +0200, Palle Girgensohn wrote:
> Hi,
> 
> I despererately need this fixed, or I will be forced to throw away rt, 
> something I really don't want to. Any ideas where in the code I can find 
> the joins of IDs using LIKE?

You can grab the latest DBIx-SearchBuilder from svn. It should handle
this better.

> 
> Thanks,
> Palle
> 
> --On tisdag, mars 30, 2004 23.33.58 +0200 Palle Girgensohn 
> <girgen at pingpong.net> wrote:
> 
> >--On tisdag, mars 30, 2004 15.47.56 -0500 Jesse Vincent
> ><jesse at bestpractical.com> wrote:
> >
> >>>I'll ask the postgresql developers about this. We'll see what they
> >>>say. I also found the lines in SearchBuilder that handle this. Changed
> >>>between 0.98_1 and 0.99... So, I can downgrade for now, I guess...
> >>>Still, do you really need to match ID:s case-insensitive?
> >>
> >>It's how searchbuilder-based apps work on every other database platform.
> >>Changing that behavior or making it db-specific worries me, especially
> >>since a lot of the data is stuff that humans search on.
> >
> >hmm, ok, but these are not search criterias, they are join conditions.
> >They are ID:s, internal integers that are not shown to anyone or used in
> >the GUI, right? Integers should not need to be case-insensitive? And they
> >compare two db fields, not field with value.
> >
> >These are the fields that are ILIKEd in this query. They're all integers:
> >
> >Users.id
> >CachedGroupMembers.MemberId
> >CachedGroupMembers.GroupId
> >Tickets.id
> >Groups.Instance
> >
> >SearchBuilder seem to separate join conditions from search restrictions.
> >I tried returning "lower($field)" , ... , "lower($value)" in
> >Handle/Pg.pm:_MakeClauseCaseInsensitive(), but the single quotes are
> >added later down the code, so it became 'lower(value)' instead of
> >lower('value'). Where are the single quotes added to the query string?
> >
> >/Palle
> >
> >_______________________________________________
> >rt-devel mailing list
> >rt-devel at lists.bestpractical.com
> >http://lists.bestpractical.com/mailman/listinfo/rt-devel
> 
> 
> 
> 
> _______________________________________________
> Rt-devel mailing list
> Rt-devel at lists.bestpractical.com
> http://lists.bestpractical.com/cgi-bin/mailman/listinfo/rt-devel

-- 


More information about the Rt-devel mailing list