:hedgehog: PostHog is the leading platform for building self-driving products. Our developer tools – AI observability, analytics, session replay, flags, experiments, error tracking, logs, and more – capture all the context agents need to diagnose problems, uncover opportunities, and ship fixes. Steer it all from Slack, web, desktop, or the MCP.
Python ab-testingai-analyticsanalyticscdpdata-warehouseexperimentsfeature-flagsjavascriptproduct-analyticspythonreactsession-replaysurveystypescriptweb-analytics
chore(cyclotron): index parked jobs with no person anchor (#76043)
Daniel Marchuk94e8c6c7572c
diff --git a/rust/cyclotron-node-migrations/20260731000001_add_null_person_anchor_index.sql b/rust/cyclotron-node-migrations/20260731000001_add_null_person_anchor_index.sqlnew file mode 100644index 000000000000..f4156c35e434--- /dev/null+++ b/rust/cyclotron-node-migrations/20260731000001_add_null_person_anchor_index.sql@@ -0,0 +1,7 @@+-- no-transaction+-- The matcher looks up parked waits with no person anchor on every distinct_id first mapping, which is a+-- high-volume stream. Only a handful of jobs lack an anchor at any moment, so a partial index keeps that+-- lookup to a few rows instead of leaning on the full (team_id, distinct_id) index.+CREATE INDEX CONCURRENTLY IF NOT EXISTS idx_cyclotron_jobs_null_person_anchor+ ON cyclotron_jobs (team_id, distinct_id)+ WHERE person_id IS NULL AND distinct_id IS NOT NULL;