Modify

Opened 14 years ago

Last modified 8 years ago

#7001 new enhancement

Optimize SQL queries

Reported by: austin Owned by:
Priority: normal Component: TracTicketStatsPlugin
Severity: normal Keywords:
Cc: Trac Release: 0.11

Description

The plugin is very useful. Thanks a bunch for that.

I've noticed the plugin queries database twice for the same dataset. Also the queries return large number of data elements. These slow down significantly in a system with lots of tickets.

Attached here is my modified ticketstat.py to speed things up. It only queries the dataset onc with and smaller dataset using SQL filer.

Attachments (1)

th7001.diff (8.4 KB) - added by Ryan J Ollos 13 years ago.

Download all attachments as: .zip

Change History (11)

comment:1 Changed 14 years ago by Ryan J Ollos

Summary: A few speed improvments[Patch] A few speed improvments

It is always preferred to submit patches so the author can easily see what changes were made.

comment:2 Changed 13 years ago by Ryan J Ollos

Owner: changed from Prentice Wongvibulsin to Ryan J Ollos

Reassigning ticket to new maintainer.

Changed 13 years ago by Ryan J Ollos

Attachment: th7001.diff added

comment:3 Changed 13 years ago by Ryan J Ollos

Removed original attachment and attached a unified diff of the changes.

comment:4 Changed 11 years ago by Ryan J Ollos

Summary: [Patch] A few speed improvments[Patch] A few speed improvements

comment:5 Changed 11 years ago by Ryan J Ollos

Status: newassigned

#9296 closed as a duplicate.

comment:6 Changed 11 years ago by Ryan J Ollos

#3421 closed as a possible duplicate.

comment:7 Changed 11 years ago by Ryan J Ollos

Summary: [Patch] A few speed improvementsOptimize SQL queries

comment:8 Changed 11 years ago by Ryan J Ollos

(In [13107]) Refs #8703, #7001: Optimize SQL queries and properly utilize the Trac database API to prevent SQL injection and improve cross-DB compatibility.

comment:9 Changed 11 years ago by Ryan J Ollos

Status: assignednew

comment:10 Changed 8 years ago by Ryan J Ollos

Owner: Ryan J Ollos deleted

Modify Ticket

Change Properties
Set your email in Preferences
Action
as new The ticket will remain with no owner.

Add Comment


E-mail address and name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.