Automattic / Automattic/jetpack

Stats: email stats for individual posts are too slow

Open
#40,758 3 comments 0 reactions 0 assignees View on GitHub
[Feature] Stats Data [Focus] Performance [Platform] Atomic [Platform] Simple [Plugin] Jetpack [Pri] Normal [Status] Auto-allocated [Status] Escalated to Product Ambassadors [Status] Priority Review Triggered Bug Triaged
Dominant language
PHP
Stars
1.8k
Forks
898
Avg merge
1d 18h
Merged PRs (30d)
774

Description

### Impacted plugin

Jetpack

### Quick summary

Our email stats for individual posts (and likely other cases) are way too slow for larger sites.

This may mean that we need to redesign the backend tables or change the way that queries are working.

### Steps to reproduce

1. Go to the email stats for an individual post. Example https://wordpress.com/stats/email/opens/day/54632/3584907 (this is en.blog)
2. Most of the data will minutes to load and/or will timeout.

Image

Image

### A clear and concise description of what you expected to happen.

_No response_

### What actually happened

_No response_

### Impact

Some (< 50%)

### Available workarounds?

No and the platform is unusable

### If the above answer is "Yes...", outline the workaround.

_No response_

### Platform (Simple and/or Atomic)

Simple, Atomic, Self-hosted

### Logs or notes

_No response_

Contributor guide

Open the contributing guide

Research direction

Start by reproducing the email stats page at the URL in the issue and measuring its load and timeout behavior on the example site. Trace the backend tables and queries used for individual-post email stats; done means the page no longer takes minutes to load or times out on larger sites.

Written by the indexing model from the issue text.

Assessment

Tech stack
php
Domain
backend, databases, performance
Issue type
Bug
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.