So, we have a table that basically includes most of the ticket details of a ticket, except for stuff that is horribly long (like notes, tech notes, pictures, etc), those are linked elsewhere in other tables, etc.
We want to return metrics about the various tickets in the data table. For example:
SELECT Category, Count(Category) FROM tickets
WHERE Date_SUB(CURDATE(), Interval 16 Hour) <= Datez GROUP BY Category
Which would return a result listing, for example, each of our categories, and their counts.
However, if we want to adjust this for various intervals, like return the numbers for say 16 hours
, 1 day
, 30 day
, 3 month
, 12 month
and All time
, are we going to have to run that same query that # of times (like for each of those listed minus all time, run that query 5 times?
Ultimately, we want to use the counts in a dashboard of some sort in our C# Winforms application, that will show us various ticket data, so we can see how the department is doing; but, if we have to sit there and run say 5 queries every few minutes, that can tend to bog down the system no?