[rt-users] Users Autocomplete not working 4.0.7?

Thomas Sibley trs at bestpractical.com
Thu Aug 30 16:49:19 EDT 2012


Please keep replies on the list for the benefit of folks searching for
answers later.

On 08/30/2012 01:16 PM, Shawn Plummer wrote:
> My DBA tells me that this is the query she sees in the database when
> the autocomplete fires:
> 
>> "SELECT * FROM ( SELECT limitquery.*,rownum limitrownum FROM (
>> SELECT main.* FROM ( SELECT DISTINCT main.id FROM Users main JOIN
>> Principals Principals_1  ON ( Principals_1.id = main.id )  WHERE
>> (Principals_1.Disabled = '0') AND (lower(main.RealName) LIKE
>> '%taf2%' OR lower(main.EmailAddress) LIKE 'taf2%' OR
>> lower(main.Name) LIKE 'taf2%') AND
>> (lower(Principals_1.PrincipalType) = 'user') AND (main.EmailAddress
>> != '' AND main.EmailAddress IS NOT NULL)  ) distinctquery, Users
>> main WHERE (main.id = distinctquery.id)  ORDER BY main.Name ASC  )
>> limitquery WHERE rownum <= 10 ) WHERE limitrownum >= 1"

If you run that (awful awful) query by hand, what does it get you?



More information about the rt-users mailing list