You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

43 lines
1.2 KiB

This file contains ambiguous Unicode characters!

This file contains ambiguous Unicode characters that may be confused with others in your current locale. If your use case is intentional and legitimate, you can safely ignore this warning. Use the Escape button to highlight these characters.

-- 文件名index_creation_scripts.sql
-- 这是为员工考勤管理系统编写的索引创建脚本
-- 1. 为员工姓名创建索引
CREATE INDEX idx_employee_name
ON Employee (Name);
-- 2. 为员工部门ID创建索引
CREATE INDEX idx_employee_department
ON Employee (DepartmentID);
-- 3. 为考勤表中的员工ID创建索引
CREATE INDEX idx_attendance_employeeid
ON Attendance (EmployeeID);
-- 4. 为考勤表中的考勤日期创建索引
CREATE INDEX idx_attendance_date
ON Attendance (AttendanceDate);
-- 5. 为假期申请表中的员工ID创建索引
CREATE INDEX idx_leave_request_employeeid
ON LeaveRequest (EmployeeID);
-- 6. 为假期申请表中的申请状态创建索引
CREATE INDEX idx_leave_request_status
ON LeaveRequest (RequestStatus);
-- 7. 为绩效考核表中的员工ID创建索引
CREATE INDEX idx_performance_employeeid
ON PerformanceAppraisal (EmployeeID);
-- 8. 为考勤总结表中的统计月份创建索引
CREATE INDEX idx_attendance_summary_month
ON AttendanceSummary (Month);
-- 9. 为用户登录表中的员工ID创建索引
CREATE INDEX idx_userlogin_employeeid
ON UserLogin (EmployeeID);
-- 10. 为系统日志表中的用户ID创建索引
CREATE INDEX idx_system_logs_userid
ON SystemLogs (UserID);