showing "all" time entries is much slower than showing all time entries from 1900 to 2100

Added by Bernhard Seebass 4 months ago

We just upgraded to the latest version:
Environment:
Redmine version 4.2.3.stable
Ruby version 2.7.5-p203 (2021-11-24) [x86_64-linux]
Rails version 5.2.6
Environment production
Database adapter Mysql2 (using mysql 8)

Now we have the issue, that Spent Time (/time_entries) is very slow when filtering for "any" date (which is the default view).

However, it is much faster to search for all time entries between 1900-01-01 and 2099-12-31 although the exactly same 31.910 time entries are found.

Is this a known issue or is this something that only happens on our system?

Further testing shows:
- less then / more than 60 days ago is very slow
- in the past 60 days is very fast
- >= 12.31.2022 is very slow (zero results)
- this year is very fast

It seems, all open ended intervals are very slow.