I have a few tables with date columns such astreatmentDate and scheduleDate.
Assume these tables will be used by receptionists in a clinic.
Although it cannot be transparent to them 100%...when they query for a specific date, will using an index be beneficial?
For example, one of my views:
Code:
CREATE VIEW DoctorSchedule_A AS
SELECT d.*, s.scheduleDate, s.clinic
FROM Doctor d, Schedule s
WHERE d.doctorID=s.doctorID;
Nurse querying for a specific/random date:
Code:
SELECT *
FROM DoctorSchedule_A
WHERE scheduleDate='01-JAN-1970';
SELECT *
FROM DoctorSchedule_A
WHERE scheduleDate BETWEEN '01-JAN-1970' AND '05-JAN-1970';