Hello,
I note no difference despite logging every request and query. However, I have observed that a majority of the requests are held up, waiting for the query to be completed. The speed of these queries varies. While some are swift, about two-thirds of the time, they take more than a second to complete. This is unexpected, especially considering some tables contain only four rows of data.
e.g.: a simple requests when a page is loaded:
Fsc = time to find the python script
Qry = time to finish the query
Req = the full request.
Fsc: 06:42:22s | Exc time: 0.0009s | user=dev | data_generate_screen
Qry: 06:42:22s | Exc time: 1.2189s | user=dev | select date_format(f1.date,"%Y-%m-%d"), f1.start_time, f1.end_time, f1.total_time, f1.bedrijf, f1.code from t_timeregistration as f1 left join t_employees as f2 on f2.code = f1.code where f1.bedrijf = "100" and (f1.date between "2023-06-12" and "2023-06-18") and f2.code = "" order by f1.date;
Req: 06:42:22s | Req time: 1.3271s | user=dev | args=s:data_generate_screen | source=/application/t_input_hours
This is just an example, but such a process should not take more than one second, right? Can I do something to expedite the query? I use mysqlclient for my MySQL connection.
Thanks in advance!