[rt-devel] Users::WhoHaveRight and Sybase

Dean Kao nouveaux at lightconsulting.com
Mon Jun 30 15:57:47 EDT 2003


Dont know if this is of any help..but

What's looking like a pattern is anything with a custom field really
chews up the db.  The two following querries have been sitting in
the db for a while now:

2625 | Sending data | SELECT count(DISTINCT main.id) FROM ( Tickets main
	 LEFT JOIN TicketCustomFieldValues as TicketCustomFieldValues_1  ON
	 ((TicketCustomFieldValues_1.CustomField = '2')) AND (  main.id =
	 TicketCustomFieldValues_1.Ticket))  WHERE ((main.EffectiveId =
	 main.id)) AND ((main.Type = 'ticket')) AND ( (  (
	 (TicketCustomFieldValues_1.Content LIKE '%%005Store5%%') )  ) )

| 72 | rt_user | localhost | rt3  | Query   | 221  | Sending data |
SELECT count(DISTINCT main.id) FROM ( Tickets main LEFT JOIN
TicketCustomFieldValues as TicketCustomFieldValues_1  ON
((TicketCustomFieldValues_1.CustomField = '2')) AND (  main.id =
TicketCustomFieldValues_1.Ticket))  WHERE ((main.EffectiveId = main.id))
AND ((main.Type = 'ticket')) AND ( (  (
(TicketCustomFieldValues_1.Content LIKE '%%022Store22%%') )  ) AND (
(main.Queue = '17') ) )

Dean

> 
> Mysql 4.0.12
> 
> Dean
> 
> > 
> > > 
> > > Copying to tmp table | SELECT DISTINCT main.* FROM ( ( Tickets main LEFT
> > > JOIN TicketCustomFieldValues as TicketCustomFieldValues_1  ON
> > > ((TicketCustomFieldValues_1.CustomField = '1')) AND (  main.id =
> > > TicketCustomFieldValues_1.Ticket)) LEFT JOIN TicketCustomFieldValues as
> > > TicketCustomFieldValues_2  ON  ((TicketCustomFieldValues_2.CustomField =
> > > '2')) AND (  main.id = TicketCustomFieldValues_2.Ticket))  WHERE
> > > ((main.EffectiveId = main.id)) AND ((main.Type = 'ticket')) AND ( (  (
> > > (TicketCustomFieldValues_1.Content LIKE '%%01Components%%') ) OR (
> > > (TicketCustomFieldValues_2.Content LIKE '%%023Store23%%') )  ) AND (
> > > (main.Status = 'resolved') ) )  ORDER BY main.id ASC LIMIT 50 |
> > > 
> > > 
> > > Dean
> > > _______________________________________________
> > > rt-devel mailing list
> > > rt-devel at lists.fsck.com
> > > http://lists.fsck.com/mailman/listinfo/rt-devel
> > > 
> > 
> > -- 
> > http://www.bestpractical.com/rt  -- Trouble Ticketing. Free.
> _______________________________________________
> rt-devel mailing list
> rt-devel at lists.fsck.com
> http://lists.fsck.com/mailman/listinfo/rt-devel



More information about the Rt-devel mailing list