Help! I have 2 tables: tblAbsences and tblAbsences_Archive. Each day, 5K records are inserted into tblAbsences, which is why I need to archive the old data. To run the necessary reports, I need both tables combined into one query. I'm using a UNION query, and since there's appr. 3 million records in the archive table, and up to 500,000 in the Absences table, it takes close to 20 min to run in Query Analyzer. This is going to be an Access Jet Query, which is slower. Either way, it's unacceptable. Any ideas?
Query:
Select StudentID, ClassID, Date, Status from tblAbsences
UNION
Select StudentID, ClassID, Date, Status from tblAbsences_Archive
Query:
Select StudentID, ClassID, Date, Status from tblAbsences
UNION
Select StudentID, ClassID, Date, Status from tblAbsences_Archive