bb33a84058
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' |
||
---|---|---|
.. | ||
lib | ||
test | ||
.eslintrc.js | ||
index.js | ||
package.json |