×

Notice

The forum is in read only mode.

Query Optimisation

3 years 8 months ago #1433 by Herson
Query Optimisation was created by Herson
Just wondering whether my standard query below requires to be tuned further as I'm trying to reduce the load on the database platform. The date range being queried is 31 days in 2019 and the expected result set is < 5000 rows. The query used to take around 10 mins to run but in the past 3-4 weeks this has increased to 120 mins. Would the number of decimal places for the lat/long make a difference?

select *
FROM
state_vectors_data4
where lat between 54.68122 and 54.71018
and lon between -1.247191 and -1.2020089999999999
and hour between 1564617600.0 and 1567296000.0

Thanks.

Richard.
3 years 8 months ago - 3 years 8 months ago #1434 by Herson
Replied by Herson on topic Query Optimisation
Don't know what happened but the queries are now running as expected. Magic. However, later that day the queries slowed down again. Must be due to general/concurrent demand on the data server as opposed to a badly formed query.
Powered by Kunena Forum