[Trac] Re: mysql -slow query 7seconds (how can I create an index for custom field?) 1.1million tickets
On Wednesday, November 14, 2012 at 10:40:32 AM UTC-6, Lukasz Szybalski wrote: > > Hello, > So it looks like this is a problem: > > SELECT * FROM ticket AS t LEFT OUTER JOIN ticket_custom AS custom_number > ON (id=custom_number.ticket AND custom_number.name='custom_number') > whERE *COALESCE(custom_number.value,'') LIKE '%3042183%' *ORDER BY t.id > ,custom_number.ticket; > > then 1 row in set (7.03 sec) > > Vs > SELECT * FROM ticket AS t LEFT OUTER JOIN ticket_custom AS custom_number > ON (id=custom_number.ticket AND custom_number.name='custom_number') > whERE *custom_number.value LIKE '%3042181%' *ORDER BY t.id > ,custom_number.ticket; > > 2 rows in set (0.27 sec) > > > Where is this query stored in? Can I remove the "*COALESCE"?* > Is it required? > > Should I create a ticket for this? > > Hello, I wanted to follow up on this inquiry from 2 years ago. We are at a point where our trac holds 1.1 million tickets and searching for custom_field takes 14seconds. I have modified the query.py starting at line 540 in trac 0.12.3 (Debian stable) if mode == '~': value = '%' + value + '%' elif mode == '^': value = value + '%' elif mode == '$': value = '%' + value #Commented out by Lucas on 2015-01-08 return ("COALESCE(%s,'') %s%s" % (col, neg and 'NOT ' or '', return ("%s %s%s" % (col, neg and 'NOT ' or '', db.like()), (value, )) This changes the query from 14seconds to about 1seconds. Does anybody see a problem why this would not be a good idea? Thanks Lucas -- You received this message because you are subscribed to the Google Groups "Trac Users" group. To unsubscribe from this group and stop receiving emails from it, send an email to trac-users+unsubscr...@googlegroups.com. To post to this group, send email to trac-users@googlegroups.com. Visit this group at http://groups.google.com/group/trac-users. For more options, visit https://groups.google.com/d/optout.
Re: [Trac] Notification system question
On Thu, Jan 8, 2015 at 2:45 AM, Gernot Kollegger wrote: > We are using trac for our support workflow. > We want to be able to supress messages to external users if we set a > certain custom field within a ticket. > > Futher more we have defined a workflow and messages to external members > should only be send in specific ticket states. > > Is there a way to inspect and modifiy the recipients list of the > notification system before the emails are processed? > > -- > Gernot > Trac 1.0 / Debian The core of AnnouncerPlugin is being integrated to Trac for release in 1.2, so that will open up more possibilities along the lines of what QuietPlugin implements: http://trac-hacks.org/wiki/QuietPlugin For now, you can probably implement the feature by replacing get_ticket_notification_recipients (1), or writing a wrapper that calls it. See FlexibleReporterNotificationPlugin (2) for an example of how to replace a function: (1) http://trac.edgewall.org/browser/tags/trac-1.0/trac/ticket/notification.py?marks=76#L75 (2) http://trac-hacks.org/wiki/FlexibleReporterNotificationPlugin -- You received this message because you are subscribed to the Google Groups "Trac Users" group. To unsubscribe from this group and stop receiving emails from it, send an email to trac-users+unsubscr...@googlegroups.com. To post to this group, send email to trac-users@googlegroups.com. Visit this group at http://groups.google.com/group/trac-users. For more options, visit https://groups.google.com/d/optout.
Re: [Trac] SQLite database question
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On 08.01.2015 07:45, Roger Oberholtzer wrote: > Specifically, what I am trying to accomplish is updating a file in the > file system, and then updating the date and size fields in the Trac > download table to reflect this. If I could do this via Trac I would be > happy. I'd implement some XMLRPC method [1] extending DownloadsPlugin [2] for altering the Trac db. Get an idea of how such an RPC implementation is done from another, recently added implementation [3] of that API. > But I think this is not possible. Specifically such a thing like "is not possible" does not exist for a highly versatile, modularized CMS like Trac. :-) Steffen Hoffmann [1] https://trac-hacks.org/wiki/XmlRpcPlugin [2] https://trac-hacks.org/wiki/DownloadsPlugin [3] http://trac-hacks.org/changeset/13858/tagsplugin -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.12 (GNU/Linux) iEYEARECAAYFAlSu4ssACgkQ31DJeiZFuHexDgCgxDXskJWs1kR41zQRQg2QffIP aYEAnjQICAd2nsfgUaU/hGuszq7pR456 =flUV -END PGP SIGNATURE- -- You received this message because you are subscribed to the Google Groups "Trac Users" group. To unsubscribe from this group and stop receiving emails from it, send an email to trac-users+unsubscr...@googlegroups.com. To post to this group, send email to trac-users@googlegroups.com. Visit this group at http://groups.google.com/group/trac-users. For more options, visit https://groups.google.com/d/optout.
[Trac] Notification system question
We are using trac for our support workflow. We want to be able to supress messages to external users if we set a certain custom field within a ticket. Futher more we have defined a workflow and messages to external members should only be send in specific ticket states. Is there a way to inspect and modifiy the recipients list of the notification system before the emails are processed? -- Gernot Trac 1.0 / Debian -- You received this message because you are subscribed to the Google Groups "Trac Users" group. To unsubscribe from this group and stop receiving emails from it, send an email to trac-users+unsubscr...@googlegroups.com. To post to this group, send email to trac-users@googlegroups.com. Visit this group at http://groups.google.com/group/trac-users. For more options, visit https://groups.google.com/d/optout.