KamoCRM

Doc Views count reading time and links issued, pinned to index seeks (DL5.3)

FeatureEmailService
Shipped
November 13, 2026 at 10:16 AM UTC
Author
Kamo
Commit
f76409c

GET **************** now answers, per doc, links issued, recipients it went to, recipients who opened it, views and seconds of reading time **************** and the same per recipient, plus campaign totals (totalSeconds, linksIssued). One read, one row per recipient x link, summed in Java. Yugabyte has no planner stats on these tables and, unhinted, chose an org-wide scan of doc_share_links (ix_dsl_org_issued) for the old three queries — so the read is pinned by pg_hint_plan to seeks: recipients by ix_campaign_recipient_campaign, links by ix_dsl_source_ref (batched nested loop on the token), sessions by ix_dvs_link_started (EXPLAIN checked 2026-11-13). Completes dbf6877. CampaignDocViewsTest (5).

All changes

Like what you see shipping?

All of it arrives in your workspace on its own. Start on the free plan and read this page again in a month.

Start Free ForeverView Pricing