Ghost/ghost/core/test/utils
Kevin Ansfield bd93bf0dea Optimised email stats aggregation query for typical column usage
ref https://linear.app/tryghost/issue/ENG-790/remove-use-of-sub-queries-in-email-analytics

- the `delivered_at` column is typically entirely/nearly entirely filled with values meaning the `IS NOT NULL` query matches a huge number of rows that MySQL has to fetch from the index to count
- using `IS NULL` switches that behaviour around as it will now match very few rows which has been shown in testing to be considerably quicker
- after switching to `IS NULL` the query returns an "undelivered" count rather than a "delivered" count, in order to keep the rest of the system behaviour the same we can calculate the delivered count by subtracting the query result from the total number of emails sent which we can fetch using a very fast primary key lookup query on the `emails` table
2024-04-03 16:27:23 +01:00
..
agents Sped up comments and feedback tests by reusing Ghost app instance 2022-11-18 14:58:35 +01:00
fixtures Optimised email stats aggregation query for typical column usage 2024-04-03 16:27:23 +01:00
mocks Fixed Playwright tests for new email flow 2023-01-20 19:00:13 +01:00
admin-utils.js 🎨 Reduced requests and 403 responses for comments auth check (#19840) 2024-03-12 12:27:18 +00:00
api.js Cleaned up lexicalEditor labs flag, switched Post model to lexical-by-default (#18607) 2023-10-23 17:51:34 +01:00
assertions.js Removed custom assertions 2023-03-10 14:29:55 +01:00
batch-email-utils.js Added email address alignment protections (#19094) 2023-11-23 10:25:30 +01:00
configUtils.js Fixed configUtils and adapter cache issues in E2E tests (#16167) 2023-01-30 14:06:20 +01:00
db-utils.js Removed Bluebird Promise.each from db.utils (#17032) 2023-06-23 09:46:41 +02:00
e2e-framework-mock-manager.js Added email address alignment protections (#19094) 2023-11-23 10:25:30 +01:00
e2e-framework.js Added Source as the new default theme 2023-10-03 14:02:08 +02:00
e2e-utils.js Added Source as the new default theme 2023-10-03 14:02:08 +02:00
fixture-utils.js Added page html reset and re-render to handle dynamic collection card content (#18265) 2023-09-21 14:51:08 +00:00
index.js 🔒 Fixed filtering on private Author fields in Content API 2023-05-03 08:43:20 -04:00
mocha-retry-reporter.js Enabled and tracked retries in CI tests (#16909) 2023-06-02 09:36:28 +02:00
overrides.js Disabled network retries for webmentions in tests (#18269) 2023-09-21 16:17:05 +02:00
redirects.js Converted Ghost repo into a monorepo 2022-07-20 16:41:05 +02:00
stripe-mocker.js 🐛 Fixed handling multiple Stripe subscriptions for same member (#17773) 2023-08-22 13:27:21 +02:00
url-service-utils.js Converted Ghost repo into a monorepo 2022-07-20 16:41:05 +02:00
urlUtils.js Removed all unused variables from test files 2023-03-10 14:29:55 +01:00