I have changed the test database server from windows to synology. After this change, there is one query which takes 9-10 sec to get a result on synology. On the Windows server , it took 0.18sec to get data. When I exported data , indexes and triggers were also exported. So no issue with indexes.
I have also compared "Explain SQL" result on both server and It is same no difference.
select SUM(work_hours) as apt_hour, `employee_id` from `job_status` where `job_date` = '2020-10-23' and `status` != '0' and `job_status`.`deleted_at` is null group by `employee_id`
What is causing issue here? How to decrease the execution time ?