English Deutsch Français Italiano Español Português 繁體中文 Bahasa Indonesia Tiếng Việt ภาษาไทย
All categories

Which uses less resources? For instance, if I have a help desk and, as an admin, I'm tryhing to look at a page to find out the number of tickets a user has placed and the average response time of all of the tickets the user has placed: would it be better to

A-just make database fields for the average response time and number of tickets and just update these fields each time a ticket is made and is responded to

-OR-

B-pull other items from the database and calculate the average response time and number of tickets on the page that our admins go to in order to see the user's information?

I hope that's clear. If it's not, I'll clarify.

2007-05-07 11:09:38 · 3 answers · asked by goodjob 1 in Computers & Internet Programming & Design

3 answers

My inclination is that Option A would be the better choice -- but with a caveat. And this is why I think so:

I think the table used for Option A should have a Primary Key composed of UserID and TicketID, AND instead of ►average◄ time, that field should just be ►response time◄ (for the associated TicketID). That way the number of tickets per user and the average response time for all tickets associated with a user could be revealed with a single query.

For Option B, just the fact that you have to gather and assemble other items before performing any calculations means additional resources would be required.

§

2007-05-07 11:45:57 · answer #1 · answered by BlueFeather 6 · 0 0

Both methods will work, and depend on many minor factors, the timing various.

If you do lots of reporting, then A will be best as the reports doesnt have to do much calculation.
If you do lots of data-entry but less reporting, use method B as the field calculation could slow down the table updates between each entry.

In real life ? with a decent spec server and fast disk access time plus fast LAN, they really dont make much difference, again, this factor can alter a lot depend on number of records and how your relationships are setup, too many pulls from different tables and bad programming will slow down regardless which method you use.

2007-05-07 11:19:46 · answer #2 · answered by Cupcake 7 · 0 0

You should keep individual records of each call, logging the client id, start time and finish time. Also the answerer's employee id. You should then be able to pull up this information on subsequent calls and read the information direct.

2007-05-07 11:18:23 · answer #3 · answered by Anonymous · 0 0

fedest.com, questions and answers