Optimising count query : Added option param to skip distinct from count query for members events API (#20700)

Ref:
https://linear.app/tryghost/issue/ENG-1470/improve-the-performance-of-the-membersevents-aggregated-click-event
This commit is contained in:
Princi Vershwal 2024-08-01 13:14:40 +05:30 committed by GitHub
parent d2ef1cc8cb
commit 086ed9e7a9
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -507,6 +507,7 @@ module.exports = class EventRepository {
...options,
withRelated: ['member'],
filter: 'custom:true',
useBasicCount: true,
mongoTransformer: chainTransformers(
// First set the filter manually
replaceCustomFilterTransformer(filter),