Currently, when using the date range module in core, and using a value from the range as the filter in a view, the result is a very slow query, that relies on a significant amount of computing per row within the database. An example is shown below. On a very small site, when doing a performance review, the view that relied on this comparison tested as the slowest page on the site.

CommentFileSizeAuthor
Screen Shot 2019-03-16 at 10.28.06 AM.png313.78 KBmandclu

Comments

mandclu created an issue. See original summary.

mandclu’s picture

Issue summary: View changes
w01f’s picture

Perhaps the smart date module has a better implementation for performance for the date range feature - that could possibly, eventually, be used as the default in core?

https://www.drupal.org/project/smart_date

w01f’s picture

Hi, after reviewing several related issues and coming to at least a better understanding of this and related issues, I've made a new issue in drupal core about this - https://www.drupal.org/project/coredev/issues/3063377#comment-13156172

Please feel free to comment, add, or correct any of the information I've put together!

mandclu’s picture

lendude’s picture

Status: Active » Postponed (maintainer needs more info)

Thanks for raising this!

a very slow query

Can we get numbers on this? I'm sure it's true, it's just that numbers give credibility to the statement.

Some sort of semblance of a possible direction of a fix for this might be nice too (what SHOULD the query look like to be more performant but so it still works with the existing database structure and across different database backends). Now it just reads like an observation. The issue here #3063377: Dates and dateranges - core handling, storage, and planning for the future (not sure why an issue there is needed/wanted, that is a pretty dead project it seems), talks about the difficulty of working with dates stored as strings. If that is indeed the underlying difficulty here, that seems like an issue that needs to be fixed somewhere else then Views.

w01f’s picture

Hi @Lendude, I've added a short clarification of the purpose of the issue you linked. Here's the excerpt:

To clarify - this post is in support of getting an improved standard for handling dates and times into core. In my opinion, with the extendability and prevalence of other modules that rely on this - calendars, scheduling, office hours, registrations/booking, etc. - a core standard is warranted and would be exceedingly useful to the community.

As an intermediate developer reviewing many of the current modules and issues regarding the handling, etc. of dates currently seems a bit wild west. And I think a standard, best practices (performant) storage and basic ui functionality in core would allow for cleaner, more coherent coding and discussions, more inherently compatible projects, and be just another feather in the cap to tout d8/d9's modern utility.

Version: 8.8.x-dev » 8.9.x-dev

Drupal 8.8.0-alpha1 will be released the week of October 14th, 2019, which means new developments and disruptive changes should now be targeted against the 8.9.x-dev branch. (Any changes to 8.9.x will also be committed to 9.0.x in preparation for Drupal 9’s release, but some changes like significant feature additions will be deferred to 9.1.x.). For more information see the Drupal 8 and 9 minor version schedule and the Allowed changes during the Drupal 8 and 9 release cycles.

Version: 8.9.x-dev » 9.1.x-dev

Drupal 8.9.0-beta1 was released on March 20, 2020. 8.9.x is the final, long-term support (LTS) minor release of Drupal 8, which means new developments and disruptive changes should now be targeted against the 9.1.x-dev branch. For more information see the Drupal 8 and 9 minor version schedule and the Allowed changes during the Drupal 8 and 9 release cycles.

Version: 9.1.x-dev » 9.2.x-dev

Drupal 9.1.0-alpha1 will be released the week of October 19, 2020, which means new developments and disruptive changes should now be targeted for the 9.2.x-dev branch. For more information see the Drupal 9 minor version schedule and the Allowed changes during the Drupal 9 release cycle.

Version: 9.2.x-dev » 9.3.x-dev

Drupal 9.2.0-alpha1 will be released the week of May 3, 2021, which means new developments and disruptive changes should now be targeted for the 9.3.x-dev branch. For more information see the Drupal core minor version schedule and the Allowed changes during the Drupal core release cycle.

Version: 9.3.x-dev » 9.4.x-dev

Drupal 9.3.0-rc1 was released on November 26, 2021, which means new developments and disruptive changes should now be targeted for the 9.4.x-dev branch. For more information see the Drupal core minor version schedule and the Allowed changes during the Drupal core release cycle.

amber himes matz’s picture

Thanks for reporting this issue. We rely on issue reports like this one to resolve bugs and improve Drupal core.

As part of the Bug Smash Initiative, we are triaging issues that are marked "Postponed (maintainer needs more info)". This issue was marked "Postponed (maintainer needs more info)" back in June 2019.

There has been no activity here for 3 years and 11 months.

Since we need more information to move forward with this issue, I am keeping the status at Postponed (maintainer needs more info). If we don't receive additional information to help with the issue, it may be closed after 3 months.

Thanks!

Version: 9.4.x-dev » 9.5.x-dev

Drupal 9.4.0-alpha1 was released on May 6, 2022, which means new developments and disruptive changes should now be targeted for the 9.5.x-dev branch. For more information see the Drupal core minor version schedule and the Allowed changes during the Drupal core release cycle.

Version: 9.5.x-dev » 10.1.x-dev

Drupal 9.5.0-beta2 and Drupal 10.0.0-beta2 were released on September 29, 2022, which means new developments and disruptive changes should now be targeted for the 10.1.x-dev branch. For more information see the Drupal core minor version schedule and the Allowed changes during the Drupal core release cycle.

quietone’s picture

Status: Postponed (maintainer needs more info) » Closed (works as designed)

As stated in #13 more information is needed here. Since that has not been supplied in 4 years I am closing this issue.

If you are experiencing this problem on a supported version of Drupal reopen the issue, by setting the status to 'Active', and provide the information asked for in #6.

Thanks