0

Working on an in-house ticketing system in php/mysql. This short term ticketing system has been in place for a year or so now.

We are reaching 10,000 tickets and I would like to make the queries more efficient, since 9,500 or so of the tickets do not need to be looked at each day.

Right now the queries are getting rows by tech id, then checking to see if it's an open ticket.

I am guessing that if I make it look for open tickets then tech id the query will be more efficient. Is this true (rows with less options to rows with more options as the query builds?)

1 Answer 1

3

Don't guess, measure!

The most important part is that you have appropriate indexes for your query. And 10000 is not a large number of rows, if this is noticably slow your query probably isn't using an index.

SO question: What resources exist for Database performance-tuning?

2
  • +1 for indexes. And instead of measuring, you could try to do the math as well, if you studied some database design. Which is faster can probably be debated though. :-)
    – Patrick
    Sep 13, 2010 at 13:35
  • Math is not my strong point. Thanks for the link. I ran the two queries and see the open tickets then tech id is faster. I am looking for efficiency or resource usage over speed for the long term and will use the links to find out how to measure that.
    – eric.s
    Sep 13, 2010 at 13:40

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.