[rt-devel] Re: [BUG][major] It's now imposible search by two requestors.

Jesse Vincent jesse at bestpractical.com
Thu Sep 18 12:55:08 EDT 2003



On Thu, Sep 18, 2003 at 12:17:54PM -0400, Jesse Vincent wrote:
> 
> 
> 
> On Thu, Sep 18, 2003 at 07:25:57PM +0400, Ruslan U. Zakirov wrote:
> > >
> > >Can you please verify that this is also the case with stock RT 3.0.5?
> > >
> > Done. Same result. mySQL(4.0.last) can't finish this query in small time.
> 
> Thanks Grr. That was supposed to have been fixed.

So. I just fired up a vanilla RT 3.0.5 instance. I clicked on the
"General" quicksearch. Then I typed "jesse at fsck.com" into the
"Requestor" email address box. Then I typed "jonas at example.com" into the
email address box. It works fine for me.

The search it generated was:

SELECT DISTINCT main.* FROM Tickets main, Groups Groups_1, Principals
Principals_2, CachedGroupMembers CachedGroupMembers
_3, Users Users_4  WHERE ((main.EffectiveId = main.id)) AND ((main.Type
= 'ticket')) AND ( (  (  ( (Users_4.EmailAddress LIKE
'%jonas at example.com%')OR(Users_4.EmailAddress LIKE '%jesse at fsck.com%') ) AND(Groups_1.Domain =
'RT::Ticket-Role')AND(Groups_1.Type =
'Requestor')AND(Principals_2.PrincipalType = 'Group') )
  ) AND ( (main.Status = 'new')OR(main.Status = 'open') ) AND (
  (main.Queue = '1') ) )  AND Groups_1.Instance = main.id  AND
  Groups_1.id = Principals_2.ObjectId  AND Principals_2.id = CachedGroupMembers_3.GroupId  AND
  CachedGroupMembers_3.MemberId = Users_4.id  ORDER BY main.id ASC LIMIT
  50


Which returns in milliseconds.




-- 
http://www.bestpractical.com/rt  -- Trouble Ticketing. Free.



More information about the Rt-devel mailing list