[Trac] TICKET_EDIT_DESCRIPTION for own description

2015-07-16 Thread Mo
Hi,

is there some TICKET_EDIT_DESCRIPTION for allowing users to edit 
descriptions of their own tickets, I mean reported not assigned.

It would be more useful to behave like TICKET_EDIT_COMMENT, that is 
enabling allows to edit all comments, and disabling means only being 
allowed to edit one own comments.
But without TICKET_EDIT_DESCRIPTION user cannot edit or correct their own 
descriptions.

Best regards.

-- 
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] Status sorting in ticket list

2015-07-16 Thread Mo
Hi,

if sorting for status in the ticket list this appears to sort 
alphabetically like accepted, closed, new.
A workflow sorting would be more appropriate here like new, accepted, 
closed. It this already possible or worth a bug report?

Best regards.

-- 
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] Created Modified timestamp formatting

2015-07-16 Thread Mo
Hi,

is there a way to edit the created and modified timestamp formatting in 
ticket lists? This is currently the elapsed time, but simetimes it's more 
useful to have absolute timestamps, which can be sorted.

Best regards.

-- 
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] TICKET_EDIT_DESCRIPTION for own description

2015-07-16 Thread Jun Omae
On Thu, Jul 16, 2015 at 7:58 PM, Mo burcheri.mass...@gmail.com wrote:
 is there some TICKET_EDIT_DESCRIPTION for allowing users to edit
 descriptions of their own tickets, I mean reported not assigned.

 It would be more useful to behave like TICKET_EDIT_COMMENT, that is enabling
 allows to edit all comments, and disabling means only being allowed to edit
 one own comments.
 But without TICKET_EDIT_DESCRIPTION user cannot edit or correct their own
 descriptions.

See http://trac.edgewall.org/ticket/7438

-- 
Jun Omae jun6...@gmail.com (大前 潤)

-- 
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] Status sorting in ticket list

2015-07-16 Thread Ryan Ollos
On Thu, Jul 16, 2015 at 4:49 AM, Mo burcheri.mass...@gmail.com wrote:

 Hi,

 if sorting for status in the ticket list this appears to sort
 alphabetically like accepted, closed, new.
 A workflow sorting would be more appropriate here like new, accepted,
 closed. It this already possible or worth a bug report?

 Best regards.


Only alphabetical sorting is possible in the Report and Query views.

While there is an intuitive ordering for the 3 states you've shown, it's
not clear what criteria would actually be used to sort them. Consider a
moderately more complex workflow. What is the intuitive ordering, and
what the algorithm be to determine the ordering?
http://trac.edgewall.org/wiki/TracWorkflow#Environmentscreatedwith0.11

-- 
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] Created Modified timestamp formatting

2015-07-16 Thread Steffen Hoffmann
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

On 16.07.2015 13:56, Mo wrote:
 Hi,
 
 is there a way to edit the created and modified timestamp formatting
 in ticket lists? This is currently the elapsed time, but simetimes it's
 more useful to have absolute timestamps, which can be sorted.

Browse to preferences page, so you can choose the relative vs. absolute
time stamp format for that UID/session.

Steffen Hoffmann

-BEGIN PGP SIGNATURE-
Version: GnuPG v1

iEYEARECAAYFAlWoBZkACgkQ31DJeiZFuHdcQQCfWKNqjjuBsms9EkV5pmPel/fb
KX8AoNe+WYOjJE6rqUM4Ju/Dra1epKAI
=tRUw
-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.


Re: [Trac] Private comments

2015-07-16 Thread Ryan Ollos
On Thu, Jul 16, 2015 at 12:51 PM, f.pol...@gmail.com wrote:

 Greetings.

 I am currently trying to implement a variant of PrivateCommentPlugin at
 https://trac-hacks.org/wiki/PrivateCommentPlugin for an internal trac.
 Essentially, I need to add a checkbox to the form for adding or editing a
 comment, and then save a tuple (ticket_id, comment_number, checkbox_status)
 in a new table in the database when the ticket is created/edited. The
 content of this checkbox is later used to control the visibility of the
 ticket and comments.

 Now, you are probably thinking, this is exactly what PrivateCommentPlugin
 does, what's the problem?. The point is that I think that the approach
 taken in PrivateCommentPlugin does not work at all. Essentially, a checkbox
 is injected into the form, and then an IRequestFilter (
 https://trac-hacks.org/browser/privatecommentplugin/0.12/privatecomments/privatecomments.py#L53)
 checks its value and updates the database. The issue is that this is a
 request preprocessor, so the checkbox status is updated before validating
 the ticket change. If the request is later found invalid (for instance,
 because of invalid permissions), no change should be made to the database.
 Instead, if I understand correctly, PrivateCommentPlugin does not check for
 this. It looks like there is a potential security issue: by forging a
 number of invalid requests one can alter the visibility of existing and new
 comments.

 Is there an alternative? From what I understand, ITicketChangeListener
 does not work for me because `req` is not a parameter, so I do not have
 access to the checkbox status (this has been discussed in
 http://thread.gmane.org/gmane.comp.version-control.subversion.trac.general/33193
 and
 http://thread.gmane.org/gmane.comp.version-control.subversion.trac.devel/7566),
 and ITicketManipulator doesn't work either because, again, the hook is
 called during validation, not after.

 Am I misunderstanding something? Any suggestion on how to accomplish what
 I am looking for?
 Thanks!


You probably want ITicketManipulator:
http://trac.edgewall.org/wiki/TracDev/PluginDevelopment/ExtensionPoints/trac.ticket.api.ITicketManipulator

If you'd like to submit a patch for PrivateCommentsPlugin, I'll review and
commit the change if suitable.

- Ryan

-- 
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] Status sorting in ticket list

2015-07-16 Thread Steffen Hoffmann
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

On 16.07.2015 18:56, Ryan Ollos wrote:
 On Thu, Jul 16, 2015 at 4:49 AM, Mo burcheri.mass...@gmail.com
 mailto:burcheri.mass...@gmail.com wrote:
 
 Hi,
 
 if sorting for status in the ticket list this appears to sort
 alphabetically like accepted, closed, new.
 A workflow sorting would be more appropriate here like new,
 accepted, closed. It this already possible or worth a bug report?
 
 Best regards.
 
 
 Only alphabetical sorting is possible in the Report and Query views.
 
 While there is an intuitive ordering for the 3 states you've shown, it's
 not clear what criteria would actually be used to sort them. Consider a
 moderately more complex workflow. What is the intuitive ordering, and
 what the algorithm be to determine the ordering?
 http://trac.edgewall.org/wiki/TracWorkflow#Environmentscreatedwith0.11

No algorithm, but I remember using the nearly undocumented
action.weight option for sorting actions in ticket view (see docstring
of ITicketActionController.get_ticket_actions method [1]). IMHO the same
ordering sould be considered for an alternative sort.

Steffen Hoffmann


[1] http://trac.edgewall.org/browser/tags/trac-0.11/trac/ticket/api.py#L42
-BEGIN PGP SIGNATURE-
Version: GnuPG v1

iEYEARECAAYFAlWoBMMACgkQ31DJeiZFuHdXKACgpkx2ausjbu/mx3vrTgpKvNiS
SoMAoJBqMB/O4SGu6aCxutBWylqUyK8A
=bhZR
-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] Private comments

2015-07-16 Thread f . poloni
Greetings.

I am currently trying to implement a variant of PrivateCommentPlugin at 
https://trac-hacks.org/wiki/PrivateCommentPlugin for an internal trac. 
Essentially, I need to add a checkbox to the form for adding or editing a 
comment, and then save a tuple (ticket_id, comment_number, checkbox_status) 
in a new table in the database when the ticket is created/edited. The 
content of this checkbox is later used to control the visibility of the 
ticket and comments.

Now, you are probably thinking, this is exactly what PrivateCommentPlugin 
does, what's the problem?. The point is that I think that the approach 
taken in PrivateCommentPlugin does not work at all. Essentially, a checkbox 
is injected into the form, and then an IRequestFilter 
(https://trac-hacks.org/browser/privatecommentplugin/0.12/privatecomments/privatecomments.py#L53)
 
checks its value and updates the database. The issue is that this is a 
request preprocessor, so the checkbox status is updated before validating 
the ticket change. If the request is later found invalid (for instance, 
because of invalid permissions), no change should be made to the database. 
Instead, if I understand correctly, PrivateCommentPlugin does not check for 
this. It looks like there is a potential security issue: by forging a 
number of invalid requests one can alter the visibility of existing and new 
comments.

Is there an alternative? From what I understand, ITicketChangeListener does 
not work for me because `req` is not a parameter, so I do not have access 
to the checkbox status (this has been discussed in 
http://thread.gmane.org/gmane.comp.version-control.subversion.trac.general/33193
 
and 
http://thread.gmane.org/gmane.comp.version-control.subversion.trac.devel/7566), 
and ITicketManipulator doesn't work either because, again, the hook is 
called during validation, not after.

Am I misunderstanding something? Any suggestion on how to accomplish what I 
am looking for?
Thanks!

-- 
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] Fwd: Trac 1.0.7 Released

2015-07-16 Thread Ryan Ollos
Trac 1.0.7 Released
===

Trac 1.0.7, the latest maintenance release for the
current stable branch, is now available!

You will find this release at the usual places:

  http://trac.edgewall.org/wiki/TracDownload#LatestStableRelease
  https://pypi.python.org/pypi/Trac/1.0.7

Trac 1.0.6 was release on the 20th of May and we've
provided over a dozen fixes and minor enhancements since
then.

A few highlights from this release:

 - Custom svn:keywords definitions are expanded in
   Subversion 1.8 and later (#11364).
 - Fixed MySQL performance regression in query with
   custom fields (#12113).


You can find the detailed release notes for 1.0.7 on the
following pages:
  http://trac.edgewall.org/wiki/TracDev/ReleaseNotes/1.0#MaintenanceReleases

Now to the packages themselves:

URLs:

  http://download.edgewall.org/trac/Trac-1.0.7.tar.gz
  http://download.edgewall.org/trac/Trac-1.0.7.win32.exe
  http://download.edgewall.org/trac/Trac-1.0.7.win-amd64.exe
  http://download.edgewall.org/trac/Trac-1.0.7.zip

MD5 sums:

  3a985c743f3125f69f0334740b931f7d   Trac-1.0.7.tar.gz
  6e18cd990b44106f669b1db7b1c90aa6   Trac-1.0.7.win32.exe
  30ddeda925dec5757a80efd9f4e35e66   Trac-1.0.7.win-amd64.exe
  7c5a7361e565bd5d26b302f5857172aa   Trac-1.0.7.zip

SHA1 sums:

  d1dfb226b65b2b7e72f5da2d2a0bf6343f96728   Trac-1.0.7.tar.gz
  95287e736836f783f823e27ab7c84f833f8365a0  Trac-1.0.7.win32.exe
  d06ee85b59229b8567e427b96ba8f0d1978bc45f  Trac-1.0.7.win-amd64.exe
  987ed0a80438e6e14a56b0e4a1341daafdbc1ce7  Trac-1.0.7.zip



Acknowledgements


Many thanks to the growing number of people who
have, and continue to, support the project. Also
our thanks to all people providing feedback and bug
reports that helps us make Trac better, easier to
use and more effective. Without your invaluable help,
Trac would not evolve. Thank you all.

Finally, we offer hope that Trac will prove itself
useful to like-minded programmers around the world,
and that this release will be an improvement over
the last version.

Please let us know.

/The Trac Team  http://trac.edgewall.org/

-- 
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] Trac 1.0.2 query to ticket_custom wrong SQL costing 15seconds vs left outer join would cost 0.05seconds

2015-07-16 Thread Ryan Ollos
On Thu, Jul 16, 2015 at 10:29 PM, Lukasz Szybalski szybal...@gmail.com
wrote:



 On Wednesday, June 24, 2015 at 10:17:35 PM UTC-5, Jun Omae wrote:

 Hi,

 On Thu, Jun 25, 2015 at 4:25 AM, Peter Suter pets...@gmail.com wrote:
  I'm assuming this is a ticket query. Looking at the source control
 history
  it looks like this changed in #11140
  http://trac.edgewall.org/ticket/11140
  for 12.6, 1.0.2 and 1.1.2 because MySQL and SQLite limit in the number
 of
  joins, and queries require too many.
 
  If this is a common performance regression, maybe Trac could use joins
 again
  if there are only a few custom fields.
 
  Just out of curiosity, can you tell us what  DB you are running? How
 many
  tickets are there in total? How many matching this query?

 It seems to be MySQL database since backquote characters are used for
 quoting identifiers.

 Additionally, would you please post results of EXPLAIN command for the
 two queries?

 EXPLAIN
 SELECT t.id AS id,t.summary AS summary,t.version AS version,t.status
 AS status,t.priority AS priority,t.component AS component,t.keywords
 AS keywords,t.time AS time,t.changetime AS changetime,t.milestone AS
 milestone,
 (SELECT c.value FROM ticket_custom c WHERE c.ticket=t.id AND
 c.name='contract_number') AS `contract_number`
 FROM ticket AS t
 LEFT OUTER JOIN enum AS priority ON (priority.type='priority' AND
 priority.name=priority)
 WHERE (t.status IN ('new','reopened') AND t.version NOT IN
 ('ILC','INC') AND (t.milestone='Endorsement'))
 ;

 EXPLAIN
 SELECT t.id AS id,t.summary AS summary,t.version AS version,t.status
 AS status,t.priority AS priority,t.component AS component,t.keywords
 AS keywords,t.time AS time,t.changetime AS changetime,t.milestone AS
 milestone, c2.value AS `contract_number`
 FROM ticket AS t
 LEFT OUTER JOIN ticket_custom c2
   on c2.ticket=t.id
   and c2.name='contract_number'
 LEFT OUTER JOIN enum AS priority ON (priority.type='priority' AND
 priority.name=priority)
 WHERE (t.status IN ('new','reopened') AND t.version NOT IN
 ('ILC','INC') AND (t.milestone='Endorsement'))
 ;



 Here are the details:

 # Time: 150716 23:43:30
 # User@Host:  @ x[]
 # Query_time: 12.570735  Lock_time: 0.000199 Rows_sent: 100
 Rows_examined: 3926507
 SET timestamp=1437108210;
 SELECT t.id AS id,t.summary AS summary,t.version AS version,t.status AS
 status,t.priority AS priority,t.component AS component,t.keywords AS
 keywords,t.time AS time,t.changetime AS changetime,t.milestone AS
 milestone,priority.value AS priority_value,t.`policy_number` AS
 `policy_number`
 FROM (
   SELECT t.id AS id,t.summary AS summary,t.version AS version,t.status AS
 status,t.priority AS priority,t.component AS component,t.keywords AS
 keywords,t.time AS time,t.changetime AS changetime,t.milestone AS milestone,
   (SELECT c.value FROM ticket_custom c WHERE c.ticket=t.id AND 
 c.name='policy_number')
 AS `policy_number`
   FROM ticket AS t) AS t
   LEFT OUTER JOIN enum AS priority ON (priority.type='priority' AND
 priority.name=priority)
 WHERE (COALESCE(t.status,'') IN ('new','reopened') AND
 COALESCE(t.version,'') NOT IN ('ILC','INC') AND
 (COALESCE(t.milestone,'')='UW_Cancel'))
 ORDER BY COALESCE(priority.value,'')='',CAST(priority.value AS signed),
 t.id LIMIT 100 OFFSET 0;

 see attached
 Explain_slowquery20150716.csv
 run: 12.856seconds



 Now converted to innerjoins:

 SELECT t.id AS id,t.summary AS summary,t.version AS version,t.status AS
 status,t.priority AS priority,t.component AS component,t.keywords AS
 keywords,t.time AS time,t.changetime AS changetime,t.milestone AS
 milestone,priority.value AS priority_value,t.`policy_number` AS
 `policy_number`
 FROM (
   SELECT t.id AS id,t.summary AS summary,t.version AS version,t.status AS
 status,t.priority AS priority,t.component AS component,t.keywords AS
 keywords,t.time AS time,t.changetime AS changetime,t.milestone AS milestone,
   c.value AS `policy_number`
   FROM ticket t
   inner join ticket_custom c
 on c.ticket=t.id
 and c.name='policy_number'
 ) AS t
   LEFT OUTER JOIN enum AS priority ON (priority.type='priority' AND
 priority.name=priority)
 WHERE (COALESCE(t.status,'') IN ('new','reopened') AND
 COALESCE(t.version,'') NOT IN ('ILC','INC') AND
 (COALESCE(t.milestone,'')='UW_Cancel'))
 ORDER BY COALESCE(priority.value,'')='',CAST(priority.value AS signed),
 t.id LIMIT 100 OFFSET 0;

 Explain_innerjoin_query20150716.csv
 run 9.5sec
 


 I'm not an expert on queries but I wish this query could be optimized to
 be used in memory. I'm not sure why mysql keeps creating the tmp table on
 disc to get this query created. There is enough hardware and memory to keep
 the whole thing in memory.


I believe Jun already fixed the issue in Trac 1.0.7, which was released a
few hours ago, so please evaluate the performance of the latest version
with your queries.

- Ryan

-- 
You received this message because you are subscribed to the Google Groups Trac 
Users group.
To unsubscribe from this group and stop 

Re: [Trac] Trac 1.0.2 query to ticket_custom wrong SQL costing 15seconds vs left outer join would cost 0.05seconds

2015-07-16 Thread Lukasz Szybalski


On Wednesday, June 24, 2015 at 10:17:35 PM UTC-5, Jun Omae wrote:

 Hi, 

 On Thu, Jun 25, 2015 at 4:25 AM, Peter Suter pets...@gmail.com 
 javascript: wrote: 
  I'm assuming this is a ticket query. Looking at the source control 
 history 
  it looks like this changed in #11140 
  http://trac.edgewall.org/ticket/11140 
  for 12.6, 1.0.2 and 1.1.2 because MySQL and SQLite limit in the number 
 of 
  joins, and queries require too many. 
  
  If this is a common performance regression, maybe Trac could use joins 
 again 
  if there are only a few custom fields. 
  
  Just out of curiosity, can you tell us what  DB you are running? How 
 many 
  tickets are there in total? How many matching this query? 

 It seems to be MySQL database since backquote characters are used for 
 quoting identifiers. 

 Additionally, would you please post results of EXPLAIN command for the 
 two queries? 

 EXPLAIN 
 SELECT t.id AS id,t.summary AS summary,t.version AS version,t.status 
 AS status,t.priority AS priority,t.component AS component,t.keywords 
 AS keywords,t.time AS time,t.changetime AS changetime,t.milestone AS 
 milestone, 
 (SELECT c.value FROM ticket_custom c WHERE c.ticket=t.id AND 
 c.name='contract_number') AS `contract_number` 
 FROM ticket AS t 
 LEFT OUTER JOIN enum AS priority ON (priority.type='priority' AND 
 priority.name=priority) 
 WHERE (t.status IN ('new','reopened') AND t.version NOT IN 
 ('ILC','INC') AND (t.milestone='Endorsement')) 
 ; 

 EXPLAIN 
 SELECT t.id AS id,t.summary AS summary,t.version AS version,t.status 
 AS status,t.priority AS priority,t.component AS component,t.keywords 
 AS keywords,t.time AS time,t.changetime AS changetime,t.milestone AS 
 milestone, c2.value AS `contract_number` 
 FROM ticket AS t 
 LEFT OUTER JOIN ticket_custom c2 
   on c2.ticket=t.id 
   and c2.name='contract_number' 
 LEFT OUTER JOIN enum AS priority ON (priority.type='priority' AND 
 priority.name=priority) 
 WHERE (t.status IN ('new','reopened') AND t.version NOT IN 
 ('ILC','INC') AND (t.milestone='Endorsement')) 
 ; 



Here are the details:

# Time: 150716 23:43:30
# User@Host:  @ x[]
# Query_time: 12.570735  Lock_time: 0.000199 Rows_sent: 100  Rows_examined: 
3926507
SET timestamp=1437108210;
SELECT t.id AS id,t.summary AS summary,t.version AS version,t.status AS 
status,t.priority AS priority,t.component AS component,t.keywords AS 
keywords,t.time AS time,t.changetime AS changetime,t.milestone AS 
milestone,priority.value AS priority_value,t.`policy_number` AS 
`policy_number`
FROM (
  SELECT t.id AS id,t.summary AS summary,t.version AS version,t.status AS 
status,t.priority AS priority,t.component AS component,t.keywords AS 
keywords,t.time AS time,t.changetime AS changetime,t.milestone AS milestone,
  (SELECT c.value FROM ticket_custom c WHERE c.ticket=t.id AND 
c.name='policy_number') AS `policy_number`
  FROM ticket AS t) AS t
  LEFT OUTER JOIN enum AS priority ON (priority.type='priority' AND 
priority.name=priority)
WHERE (COALESCE(t.status,'') IN ('new','reopened') AND 
COALESCE(t.version,'') NOT IN ('ILC','INC') AND 
(COALESCE(t.milestone,'')='UW_Cancel'))
ORDER BY COALESCE(priority.value,'')='',CAST(priority.value AS signed),t.id 
LIMIT 100 OFFSET 0;
 
see attached 
Explain_slowquery20150716.csv
run: 12.856seconds



Now converted to innerjoins:

SELECT t.id AS id,t.summary AS summary,t.version AS version,t.status AS 
status,t.priority AS priority,t.component AS component,t.keywords AS 
keywords,t.time AS time,t.changetime AS changetime,t.milestone AS 
milestone,priority.value AS priority_value,t.`policy_number` AS 
`policy_number`
FROM (
  SELECT t.id AS id,t.summary AS summary,t.version AS version,t.status AS 
status,t.priority AS priority,t.component AS component,t.keywords AS 
keywords,t.time AS time,t.changetime AS changetime,t.milestone AS milestone,
  c.value AS `policy_number`
  FROM ticket t
  inner join ticket_custom c
on c.ticket=t.id
and c.name='policy_number'
) AS t
  LEFT OUTER JOIN enum AS priority ON (priority.type='priority' AND 
priority.name=priority)
WHERE (COALESCE(t.status,'') IN ('new','reopened') AND 
COALESCE(t.version,'') NOT IN ('ILC','INC') AND 
(COALESCE(t.milestone,'')='UW_Cancel'))
ORDER BY COALESCE(priority.value,'')='',CAST(priority.value AS signed),t.id 
LIMIT 100 OFFSET 0;

Explain_innerjoin_query20150716.csv
run 9.5sec 



I'm not an expert on queries but I wish this query could be optimized to be 
used in memory. I'm not sure why mysql keeps creating the tmp table on disc 
to get this query created. There is enough hardware and memory to keep the 
whole thing in memory.

-- 
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