A
Andy
Situation:
My database is used to provide two reports from payroll
data. All tables are local (not ODBC) and are properly
indexed/keyed.
Using VB, I am creating individual queries for each pay
element for each employee. The individual queries are
connected in qryDeductions or qryIncomes depending on the
pay element type using outer joins such that qryDeductions
and qryIncomes returns EmployeeID for all employees and
values for all pay elements (obviously the value is null
if the employee did not receive pay for a given pay
element).
Next, all relevant employee data (date of birth, grade,
etc) is gathered in qryEmployeeDetails.
Finally, qryEmployeeDetails is combined with qryIncomes
and qryDeductions into qryEmpPayrollDetails
Problem:
There are approximately 15 deduction pay elements and 15
income pay elements thus qryDeductions contains
approximately 15 sub queries linked via outer join on
EmployeeID. If I reduce the number of deductions or
incomes to 12, qryEmpPayrollDetails returns a result set
in seconds. However, if I include all elements, it takes
more than 5 mintues. Performance Monitor shows 100% CPU
usage for the entire 5 minutes.
Question:
Does anyone out there have any suggestions to increase
performance?
My database is used to provide two reports from payroll
data. All tables are local (not ODBC) and are properly
indexed/keyed.
Using VB, I am creating individual queries for each pay
element for each employee. The individual queries are
connected in qryDeductions or qryIncomes depending on the
pay element type using outer joins such that qryDeductions
and qryIncomes returns EmployeeID for all employees and
values for all pay elements (obviously the value is null
if the employee did not receive pay for a given pay
element).
Next, all relevant employee data (date of birth, grade,
etc) is gathered in qryEmployeeDetails.
Finally, qryEmployeeDetails is combined with qryIncomes
and qryDeductions into qryEmpPayrollDetails
Problem:
There are approximately 15 deduction pay elements and 15
income pay elements thus qryDeductions contains
approximately 15 sub queries linked via outer join on
EmployeeID. If I reduce the number of deductions or
incomes to 12, qryEmpPayrollDetails returns a result set
in seconds. However, if I include all elements, it takes
more than 5 mintues. Performance Monitor shows 100% CPU
usage for the entire 5 minutes.
Question:
Does anyone out there have any suggestions to increase
performance?