locked
Table_Log very large and Slow SELECT RRS feed

  • Question

  • Hi Guys! I will try to report my problem the best way possible. I have an application in windows form C # that is used by some clients to schedule medical appointments and schedules. The application basically have four tables:
    Table Doctors: contains code and names of doctors
    Patient Table: contains code, name, address and phone number of patients;
    Table Procedures: contains the names and codes procedures performed by doctors;
    Table Log_Calendar: Contains the date, patient code, health code and code scheduled procedure at each visit.

    Knowing this, when a professional schedule an appointment he inserts the date, the procedure and the patient's name in the application that stores all the Log_Calendar table. The application displays for the doctor then only scheduled appointments for him (making a Select filtering the doctor's ID in Log_calendar table). But as can be seen all scheduled appointments are in Table Log_Calendar, and I have a few hundred users-schedule dozens of queries per day, this table then is getting huge, and as you can imagine the SELECT or any other operation is getting slow in system, and I can not erase the data because the doctors need a history book. My question is: How to make a better structure for this application without becoming slow,
    since the more most scheduling table?

    Roberto Gomez

    Friday, May 27, 2016 1:23 AM

Answers

  • I think an index on the Log_Calendar DoctorID and Date would be important for performance.  If you need more help, post the CREATE TABLE statements (including constraints and indexes) along with sample queries.

    Dan Guzman, Data Platform MVP, http://www.dbdelta.com

    • Marked as answer by robertgomez2 Monday, May 30, 2016 3:19 PM
    Friday, May 27, 2016 1:40 AM
    Answerer

All replies