SparkDevNetwork / Rock

An open source CMS, Relationship Management System (RMS) and Church Management System (ChMS) all rolled into one.
http://www.rockrms.com
572 stars 347 forks source link

DataView Filter In Group Of Type slow when using two in single DV #4211

Closed cabal95 closed 1 year ago

cabal95 commented 4 years ago

Prerequisites

Description

This is not a bug report per-se, meaning nothing is broken. But hopefully this gives a good reproducible DV query that can be used to improve performance of the DV system when complex queries are involved.

Basically, as pictured below, we setup a DV that includes people in the group type "Life Group", limiting to Active groups and either Pending or Active members. If either of the two filters are used by themselves, the DV takes 0.2 seconds to load. When both are used (show if ANY) then the DV takes 15 seconds to load.

The resulting data set if about 2,500 people so this slowdown may only show up on a larger database.

Screenshot_2020-04-28 Data Views Rock RMS

Steps to Reproduce

  1. Configure DV as shown in screenshot.
  2. Click Save
  3. Wait.

Expected behavior:

A roughly linear increase in wait time.

Actual behavior:

A 75x increase in wait time.

Versions

nairdo commented 1 year ago

I tried to reproduce on several large systems but it appears this issue has been resolved. I also spoke with @cabal95 and he agreed it looks like it's no longer an issue, but I was unable to pin-point which change resolved this. I asked him to please re-open this if he sees this issue return.