You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit 1dbdfd9
Browse filesBrowse the repository at this point in the historyBrowse files
-- (1) A competitor page every posts provider failed on is remembered for a short
3
+
-- backoff (POSTS_FAILED_RETRY_MS) instead of being re-read by every serve: diffco-us
4
+
-- drew ~1,000 failed reads an hour (2026-10-27/28, ~1.2 s each, tikhub 400).
5
+
ALTERTABLE"linkedin_company_pages" ADD COLUMN IF NOT EXISTS "posts_failed_at"timestamp with time zone;
6
+
--> statement-breakpoint
7
+
ALTERTABLE"linkedin_company_pages" ADD COLUMN IF NOT EXISTS "posts_failure"text;
8
+
--> statement-breakpoint
9
+
-- (2) POST /internal/acquisition-costs: covering indexes matching each branch's
10
+
-- predicate, so a lookup never reads the wide heap (~1.6 s mean per call before,
11
+
-- mostly heap reads of apollo_people_enrichments and email_verifications).
12
+
CREATEINDEXIF NOT EXISTS idx_enrichments_person_acq ON apollo_people_enrichments (apollo_person_id) INCLUDE (enrichment_run_id, org_id) WHERE enrichment_run_id IS NOT NULL;
13
+
--> statement-breakpoint
14
+
CREATEINDEXIF NOT EXISTS idx_enrichments_email_norm_acq ON apollo_people_enrichments (lower(btrim(email))) INCLUDE (enrichment_run_id, org_id) WHERE email IS NOT NULLAND enrichment_run_id IS NOT NULL;
15
+
--> statement-breakpoint
16
+
CREATEINDEXIF NOT EXISTS idx_email_verifications_billed_acq ON email_verifications (email) INCLUDE (verify_run_id, org_id) WHERE billed AND verify_run_id IS NOT NULL;
0 commit comments