Ghost/ghost
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
..
adapter-cache-memory-ttl Configured all unit tests to use dot reporter 2023-10-05 12:24:24 +02:00
adapter-cache-redis Added an optional timeout parameter to AdapterCacheRedis (#20131) 2024-05-02 20:39:23 -07:00
adapter-manager Update TryGhost packages 2024-05-01 17:01:41 +02:00
admin Improved performance loading posts & pages in admin (#20646) 2024-07-29 16:19:28 +00:00
announcement-bar-settings Configured all unit tests to use dot reporter 2023-10-05 12:24:24 +02:00
api-framework Fixed handling objects as API input parameters 2024-06-24 10:14:43 +02:00
api-version-compatibility-service Fixed handling requests with mismatching version and missing key 2024-05-02 13:03:26 +02:00
audience-feedback Update TryGhost packages 2024-05-27 16:58:32 +02:00
bookshelf-repository Update TryGhost packages 2024-05-27 16:58:32 +02:00
bootstrap-socket Update TryGhost packages 2024-05-27 16:58:32 +02:00
collections Update TryGhost packages 2024-05-27 16:58:32 +02:00
constants Configured all unit tests to use dot reporter 2023-10-05 12:24:24 +02:00
core Update dependency mysql2 to v3.11.0 2024-07-29 01:49:09 +00:00
custom-theme-settings-service Update TryGhost packages 2024-05-27 16:58:32 +02:00
data-generator Updated data-generator to create lexical rather than mobiledoc posts 2024-06-17 11:53:03 +01:00
domain-events Update TryGhost packages 2024-05-27 16:58:32 +02:00
donations Update dependency typescript to v5.4.5 2024-04-16 09:08:58 +02:00
dynamic-routing-events Configured all unit tests to use dot reporter 2023-10-05 12:24:24 +02:00
email-addresses Update dependency nodemailer to v6.9.14 2024-06-19 16:54:52 +00:00
email-analytics-provider-mailgun Configured all unit tests to use dot reporter 2023-10-05 12:24:24 +02:00
email-analytics-service Update TryGhost packages 2024-05-27 16:58:32 +02:00
email-content-generator Lazyloaded several required dependencies 2024-07-26 09:52:26 +02:00
email-events Configured all unit tests to use dot reporter 2023-10-05 12:24:24 +02:00
email-service Update dependency html-validate to v8.21.0 2024-07-29 09:41:05 +02:00
email-suppression-list Configured all unit tests to use dot reporter 2023-10-05 12:24:24 +02:00
express-dynamic-redirects Configured all unit tests to use dot reporter 2023-10-05 12:24:24 +02:00
external-media-inliner Add Lexical support to the external-media-inliner (#19149) 2023-11-29 17:56:03 +00:00
extract-api-key Configured all unit tests to use dot reporter 2023-10-05 12:24:24 +02:00
ghost Removed unused dependency 2024-07-03 14:35:31 +02:00
html-to-plaintext Configured all unit tests to use dot reporter 2023-10-05 12:24:24 +02:00
i18n Update dependency i18next to v23.12.2 2024-07-30 07:48:15 +00:00
importer-handler-content-files Configured all unit tests to use dot reporter 2023-10-05 12:24:24 +02:00
importer-revue Update Koenig packages (#20415) 2024-06-19 12:00:21 +00:00
in-memory-repository Improved performance for filter strings with multiple neq statements (#20198) 2024-05-13 10:35:27 -05:00
job-manager Update TryGhost packages 2024-05-27 16:58:32 +02:00
link-redirects Updated documentation for LinkRedirects (#20378) 2024-06-12 23:27:15 +00:00
link-replacer Pinned dependencies (#20257) 2024-05-27 15:29:32 +00:00
link-tracking Added tests for fix - URLs sent in emails containing a % can not be updated (#20569) 2024-07-10 02:04:45 +05:30
magic-link Update TryGhost packages 2024-05-27 16:58:32 +02:00
mail-events Update TryGhost packages 2024-05-27 16:58:32 +02:00
mailgun-client Update dependency mailgun.js to v10.2.3 2024-07-18 10:27:29 +00:00
member-attribution Fixed extra arguments being supplied to function calls 2024-05-07 11:44:07 +02:00
member-events 🎨 Added staff notification when a sub is canceled due to failed payments (#20534) 2024-07-15 08:07:18 +02:00
members-api Optimising count query : Added option param to skip distinct from count query for members events API 2024-07-31 09:37:34 +05:30
members-csv 🔒 Added escaping to member export CSV fields 2024-04-03 10:21:02 +02:00
members-events-service Updated timezone dependency (#20570) 2024-07-09 16:31:36 -05:00
members-importer Updated timezone dependency (#20570) 2024-07-09 16:31:36 -05:00
members-ssr Removed members caching cookies when no member is logged in (#20349) 2024-06-06 16:28:36 -07:00
mentions-email-report Configured all unit tests to use dot reporter 2023-10-05 12:24:24 +02:00
milestones Update TryGhost packages 2024-05-01 17:01:41 +02:00
minifier Update dependency terser to v5.31.3 2024-07-29 11:49:29 +00:00
model-to-domain-event-interceptor Configured all unit tests to use dot reporter 2023-10-05 12:24:24 +02:00
mw-api-version-mismatch Fixed extra arguments being supplied to function calls 2024-05-07 11:44:07 +02:00
mw-cache-control Configured all unit tests to use dot reporter 2023-10-05 12:24:24 +02:00
mw-error-handler Update dependency semver to v7.6.3 2024-07-24 10:37:08 +02:00
mw-session-from-token Added function names to more middleware 2024-05-06 17:51:39 +02:00
mw-update-user-last-seen Configured all unit tests to use dot reporter 2023-10-05 12:24:24 +02:00
mw-version-match Update dependency semver to v7.6.3 2024-07-24 10:37:08 +02:00
mw-vhost Configured all unit tests to use dot reporter 2023-10-05 12:24:24 +02:00
nql-filter-expansions Configured all unit tests to use dot reporter 2023-10-05 12:24:24 +02:00
oembed-service Lazyloaded several required dependencies 2024-07-26 09:52:26 +02:00
offers Update TryGhost packages 2024-05-27 16:58:32 +02:00
package-json Update TryGhost packages 2024-05-27 16:58:32 +02:00
payments Update TryGhost packages 2024-05-01 17:01:41 +02:00
post-events Configured all unit tests to use dot reporter 2023-10-05 12:24:24 +02:00
post-revisions Added custom excerpt to post revisions (#20323) 2024-06-05 14:47:33 +01:00
posts-service Removed ActivityPub backend from Ghost (#20410) 2024-06-19 15:36:36 +07:00
recommendations Update dependency @types/node to v20.14.8 2024-06-24 10:07:19 +02:00
referrers Configured all unit tests to use dot reporter 2023-10-05 12:24:24 +02:00
security Update TryGhost packages 2024-05-01 08:49:04 +02:00
session-service Added function names to more middleware 2024-05-06 17:51:39 +02:00
settings-path-manager Update TryGhost packages 2024-05-27 16:58:32 +02:00
slack-notifications Update TryGhost packages 2024-05-27 16:58:32 +02:00
staff-service Improved one-time payment notification email design (#20653) 2024-07-24 09:57:34 +00:00
stats-service Added 90 days filter to Member Count Admin Dashboard query (#20665) 2024-07-25 23:15:13 +05:30
stripe Update TryGhost packages 2024-05-27 16:58:32 +02:00
tiers Update TryGhost packages 2024-05-27 16:58:32 +02:00
update-check-service Update TryGhost packages 2024-05-27 16:58:32 +02:00
verification-trigger Update TryGhost packages 2024-05-01 17:01:41 +02:00
version-notifications-data-service Fixed handling requests with mismatching version and missing key 2024-05-02 13:03:26 +02:00
webmentions Update TryGhost packages 2024-05-27 16:58:32 +02:00
tsconfig.json Disabled TypeScript incremental building 2023-08-09 18:27:56 +02:00