[prev in list] [next in list] [prev in thread] [next in thread] 

List:       trac
Subject:    [Trac] reports available
From:       Lukasz Szybalski <szybalski () gmail ! com>
Date:       2009-06-25 17:06:14
Message-ID: 804e5c70906251006v51938f30sc4c6ffdda45912bd () mail ! gmail ! com
[Download RAW message or body]


Hello,

http://trac.edgewall.org/ticket/8354

I've opened a ticket to add more "management" reports to trac. We have
a high value of tasks that is being tracked so reports listed in above
ticket are crucial.

Here is one I need help optimizing....(500 tickets a day, 4000 in 8
days since we started)

My Recently closed tickets. Is there a way to optimized it better in
mysql? Can somebody run this in mysql query browser and see if you can
modify it to run
faster? I'm looking for actual final sql statement for mysql.

Thanks,
Lucas


select id, summary, component, milestone, owner ,
(select tc.author from ticket_change tc
     where t.id = tc.ticket and field = 'status' and newvalue =
'closed' order by tc.time DESC limit 1) as ModifiedBy,
  (TIME(FROM_UNIXTIME((select MAX(tc.time) from ticket_change tc
     where t.id = tc.ticket and field = 'status' and newvalue =
'closed')))) as closetime,
  (DATE(FROM_UNIXTIME((select MAX(tc.time) from ticket_change tc
     where t.id = tc.ticket and field = 'status' and newvalue =
'closed')))) as closedate
  from ticket t
where t.status = 'closed' and (select tc.author from ticket_change tc
     where t.id = tc.ticket and field = 'status' and newvalue =
'closed' order by tc.time DESC limit 1) = '$USER' and (select
MAX(tc.time) from ticket_change tc
     where t.id = tc.ticket and field = 'status' and newvalue =
'closed')  > UNIX_TIMESTAMP(NOW() - INTERVAL 1 DAY)
  order by closedate DESC,closetime DESC



-- 
Using rsync. How to setup rsyncd.
http://lucasmanual.com/mywiki/rsync
DataHub - create a package that gets, parses, loads, visualizes data
http://lucasmanual.com/mywiki/DataHub

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Trac Users" group.
To post to this group, send email to trac-users@googlegroups.com
To unsubscribe from this group, send email to trac-users+unsubscribe@googlegroups.com
For more options, visit this group at http://groups.google.com/group/trac-users?hl=en
-~----------~----~----~----~------~----~------~--~---


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic