Ghost/ghost/members-api
Princi Vershwal bb33a84058
Optimising count query : Added option param to skip distinct from count query for members events API
Ref https://linear.app/tryghost/issue/SLO-193/optimise-count-query-skip-distinct-from-count-query-for-members-events

The member events endpoint have many queries like:-

select count(distinct members_subscribe_events.id) as aggregate 
from `members_subscribe_events` 
where `members_subscribe_events`.`created_at` < '2024-07-30 11:30:39'

In these queries, distinct is not required as id is a primary key. Skipping distinct would improve the performance. 

This PR will changed the query to:-

select count(*) as aggregate 
from `members_subscribe_events` 
where `members_subscribe_events`.`created_at` < '2024-07-30 11:30:39'
2024-07-31 09:37:34 +05:30
..
lib Optimising count query : Added option param to skip distinct from count query for members events API 2024-07-31 09:37:34 +05:30
test 🐛 Fixed offer redemptions for free members redeeming an offer (#20571) 2024-07-09 16:05:26 -07:00
.eslintrc.js
index.js
package.json Update TryGhost packages 2024-05-27 16:58:32 +02:00