René's URL Explorer Experiment


Title: perf(logs): order public log pages on an indexed column and retire a superseded document index by waleedlatif1 · Pull Request #8913 · simstudioai/sim · GitHub

Open Graph Title: perf(logs): order public log pages on an indexed column and retire a superseded document index by waleedlatif1 · Pull Request #8913 · simstudioai/sim

X Title: perf(logs): order public log pages on an indexed column and retire a superseded document index by waleedlatif1 · Pull Request #8913 · simstudioai/sim

Description: Summary Public logs keyset: the v1/v2 log list ordered by date_trunc('milliseconds', started_at), which no index serves, so each page read and sorted every run of the workflow (and computed the handled-error flag for all of them). It now orders by the raw started_at with a microsecond cursor, using the existing (workspace, started_at, id) indexes, and filters workflowIds on workflow_execution_logs.workflow_id so multi-workflow scopes stay index-driven. Legacy millisecond cursors keep paging under the old ordering until their walk ends; one classifier decides cursor format for the decoder and the keyset, so a client cursor never reaches the query as a 500 (invalid ones get the same 400 as before). The leading inclusive bound is opt-in for the precise key only — every other keyset list renders the same SQL. Drop doc_connector_reconciliation_idx (DROP INDEX CONCURRENTLY): superseded by the v2 index in 0388; it was the only document index on source_seen_at, so it made every connector seen-stamp a non-HOT update. Add kcsl_terminal_started_at_idx (CREATE INDEX CONCURRENTLY, partial on the prune's terminal statuses) so the sync-log retention prune range-scans instead of walking the whole connector index. Type of Change Performance improvement Testing Replica EXPLAIN (ANALYZE, BUFFERS, SERIALIZE): dense workflow 7.6 s → 1.0 ms; three-workflow scope 9.6 s cold → 2.1 ms; page-2 cursor 158 ms → 1.1 ms (backward index scan, ~100 buffers) Old vs new pagination compared over 1,440 page boundaries (ties, sub-millisecond collisions, both orders, job-run union, workflow filters, resumed legacy cursors): identical New public-queries.integration.ts: limit-1 paging across a shared millisecond, job-run union, workflow filter, legacy cursor resume (no-fraction / 4-digit / ms forms); unit tests for cursor classification and rejection Confirmed the queries that occasionally used the dropped index already plan on the v2 index check:migrations, drizzle-kit generate (no drift), biome on changed files Checklist Code follows project style guidelines Self-reviewed my changes Tests added/updated and passing (new tests pass the test-audit authoring gate) No new warnings introduced I confirm that I have read and agree to the terms outlined in the Contributor License Agreement (CLA)

Open Graph Description: Summary Public logs keyset: the v1/v2 log list ordered by date_trunc('milliseconds', started_at), which no index serves, so each page read and sorted every run of the workflow (and compute...

X Description: Summary Public logs keyset: the v1/v2 log list ordered by date_trunc('milliseconds', started_at), which no index serves, so each page read and sorted every run of the workflow (and...

Opengraph URL: https://github.com/simstudioai/sim/pull/8913

X: @github

direct link

Domain: github.com

react-profiling0
react-import-mapreact,react-dom,react-dom/client,react-dom/profiling,react-is,react-reconciler,react/compiler-runtime,react/jsx-dev-runtime,react/jsx-runtime,scheduler@d5750093facf
route-pattern/:user_id/:repository/pull/:id/files(.:format)
route-controllerpull_requests
route-actionfiles
fetch-noncev2:b776a8ab-b72d-3f56-50b7-b9460dc9e0f9
current-catalog-service-hashae870bc5e265a340912cde392f23dad3671a0a881730ffdadd82f2f57d81641b
request-id931A:68EC4:30FE2E:44FDF0:6AFB7144
html-safe-nonce30e6afacaa802b640451c34b9a873c59fdff64de8791d5127293ad03b0bca5fe
visitor-payloadeyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiI5MzFBOjY4RUM0OjMwRkUyRTo0NEZERjA6NkFGQjcxNDQiLCJ2aXNpdG9yX2lkIjoiNDc3ODc4OTI1NjI0NTc2ODUxNiIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9
visitor-hmac64a5485e49e563aca9dc85284536fc8c56be45312ee3c841789c45a3e4e01f71
hovercard-subject-tagpull_request:4825693314
github-keyboard-shortcutsrepository,pull-request-list,pull-request-conversation,pull-request-files-changed,copilot
google-site-verificationApib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I
octolytics-urlhttps://collector.github.com/github/collect
analytics-location///pull_requests/show/files
fb:app_id1401488693436528
apple-itunes-appapp-id=1477376905, app-argument=https://github.com/simstudioai/sim/pull/8913/files
twitter:imagehttps://avatars.githubusercontent.com/u/40672544?s=400&v=4
twitter:cardsummary_large_image
og:imagehttps://avatars.githubusercontent.com/u/40672544?s=400&v=4
og:image:altSummary Public logs keyset: the v1/v2 log list ordered by date_trunc('milliseconds', started_at), which no index serves, so each page read and sorted every run of the workflow (and compute...
og:site_nameGitHub
og:typeobject
hostnamegithub.com
expected-hostnamegithub.com
None0e29e7974fdda2feeaf5c891efd4b23b0734b23480232b62c7bdef13f40b5b48
turbo-cache-controlno-preview
diff-viewunified
go-importgithub.com/simstudioai/sim git https://github.com/simstudioai/sim.git
octolytics-dimension-user_id199344406
octolytics-dimension-user_loginsimstudioai
octolytics-dimension-repository_id912559512
octolytics-dimension-repository_nwosimstudioai/sim
octolytics-dimension-repository_publictrue
octolytics-dimension-repository_is_forkfalse
octolytics-dimension-repository_network_root_id912559512
octolytics-dimension-repository_network_root_nwosimstudioai/sim
turbo-body-classeslogged-out env-production page-responsive full-width
disable-turbotrue
browser-stats-urlhttps://api.github.com/_private/browser/stats
browser-errors-urlhttps://api.github.com/_private/browser/errors
release2e8872b770cc4d5d0cc1f2026afab747a268e2ce
ui-targetfull
theme-color#1e2327
color-schemelight dark

Links:

Skip to contenthttps://github.com/simstudioai/sim/pull/8913/files#start-of-content
https://github.com/
Sign inhttps://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fsimstudioai%2Fsim%2Fpull%2F8913%2Ffiles
GitHubRepository hosting, code review, and collaborationhttps://github.com/platform
CopilotAI coding agent for tasks, projects, and automated workhttps://github.com/features/copilot
ActionsCI/CD and automationhttps://github.com/features/actions
Code QualityQuality analysis, fixes, and enforcementhttps://github.com/features/code-quality
CodespacesCloud development environmentshttps://github.com/features/codespaces
Code SecurityVulnerability detection and remediationhttps://github.com/security/advanced-security/code-security
Secret ProtectionSecret scanning and leak preventionhttps://github.com/security/advanced-security/secret-protection
All Featureshttps://github.com/features
Documentationhttps://docs.github.com/en
Traininghttps://learn.github.com/skills
Certificationshttps://learn.github.com/credentials
Build with Copilothttps://github.com/features/ai
Customize Copilothttps://docs.github.com/en/copilot/how-tos/copilot-on-github/customize-copilot/customize-copilot-overview
Integrationshttps://github.com/marketplace
Trending reposhttps://github.com/trending
GitHub Sponsorshttps://github.com/open-source/sponsors
Developer articleshttps://github.com/resources/articles
ChangelogYour source for the latest features, improvements, and fixes across GitHub products, all in one place.https://github.blog/changelog/
Enterpriseshttps://github.com/enterprise
Teamhttps://github.com/team
Startupshttps://github.com/enterprise/startups
Nonprofitshttps://github.com/solutions/industry/nonprofits
Healthcarehttps://github.com/solutions/industry/healthcare
Financial serviceshttps://github.com/solutions/industry/financial-services
Manufacturinghttps://github.com/solutions/industry/manufacturing
Governmenthttps://github.com/solutions/industry/government
See all industrieshttps://github.com/solutions/industry
Why GitHubhttps://github.com/why-github
Customer Storieshttps://github.com/customer-stories
Business insightshttps://github.com/solutions/executive-insights
Trust Centerhttps://github.com/trust-center
GitHub Advanced SecurityEnterprise-grade code securityhttps://github.com/security/advanced-security
Copilot for businessEnterprise-grade AI featureshttps://github.com/features/copilot/copilot-business
Premium SupportEnterprise-grade 24/7 supporthttps://github.com/enterprise/premium-support
Documentationhttps://docs.github.com/en
Resource centerhttps://github.com/resources
Bloghttps://github.blog/
Events & webinarshttps://github.com/resources/events
Community Forumhttps://github.com/orgs/community/discussions
Customer Storieshttps://github.com/customer-stories
Integrationshttps://github.com/marketplace
Customer supporthttps://help.github.com/
Traininghttps://learn.github.com/skills
GitHub Statushttps://www.githubstatus.com/
Abouthttps://github.com/about
Partnershttps://github.com/partners
Changeloghttps://github.blog/changelog/
GitHub UniverseThe event for developers, by developers — talks, workshops, and what’s next for GitHub.https://githubuniverse.com/
Pricinghttps://github.com/pricing
Sign inhttps://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fsimstudioai%2Fsim%2Fpull%2F8913%2Ffiles
Sign uphttps://github.com/signup?ref_cta=Sign+up&ref_loc=header+logged+out&ref_page=%2F%3Cuser-name%3E%2F%3Crepo-name%3E%2Fpull_requests%2Fshow%2Ffiles&source=header-repo&source_repo=simstudioai%2Fsim
Reloadhttps://github.com/simstudioai/sim/pull/8913/files
Reloadhttps://github.com/simstudioai/sim/pull/8913/files
Reloadhttps://github.com/simstudioai/sim/pull/8913/files
simstudioaihttps://github.com/simstudioai
simhttps://github.com/simstudioai/sim
Codehttps://github.com/simstudioai/sim
Issues129 (129)https://github.com/simstudioai/sim/issues
Pull requests198 (198)https://github.com/simstudioai/sim/pulls
Actionshttps://github.com/simstudioai/sim/actions
Projectshttps://github.com/simstudioai/sim/projects
Security and qualityhttps://github.com/simstudioai/sim/security
Insightshttps://github.com/simstudioai/sim/pulse
Sign up for GitHub https://github.com/signup?return_to=%2Fsimstudioai%2Fsim%2Fissues%2Fnew%2Fchoose
terms of servicehttps://docs.github.com/terms
privacy statementhttps://docs.github.com/privacy
Sign inhttps://github.com/login?return_to=%2Fsimstudioai%2Fsim%2Fissues%2Fnew%2Fchoose
waleedlatif1https://github.com/waleedlatif1
staginghttps://github.com/simstudioai/sim/tree/staging
perf/index-alignmenthttps://github.com/simstudioai/sim/tree/perf/index-alignment
Conversation 8 https://github.com/simstudioai/sim/pull/8913
Commits 4 https://github.com/simstudioai/sim/pull/8913/commits
Checks 47 https://github.com/simstudioai/sim/pull/8913/checks
Files changed https://github.com/simstudioai/sim/pull/8913/files
Please reload this pagehttps://github.com/simstudioai/sim/pull/8913/files
perf(logs): order public log pages on an indexed column and retire a superseded document index https://github.com/simstudioai/sim/pull/8913/files#top
Show all changes 4 commits https://github.com/simstudioai/sim/pull/8913/files
f82f578 perf(logs): order the public log keyset on the raw started_at column waleedlatif1 Oct 12, 2026 https://github.com/simstudioai/sim/pull/8913/commits/f82f578e7b949306de68836dbe80cb7df5059bd7
3cc34b6 perf(db): drop the superseded reconciliation index and index the sync… waleedlatif1 Oct 12, 2026 https://github.com/simstudioai/sim/pull/8913/commits/3cc34b6269bde8fd5541cb60f11b9556e052ab09
11f0f60 fix(logs): classify timestamp cursors in one place so v1 never 500s o… waleedlatif1 Oct 12, 2026 https://github.com/simstudioai/sim/pull/8913/commits/11f0f604df7821d3bc50e4179c781994461cabec
bad2dd7 test(logs): assert the precise cursor decodes before paging from it waleedlatif1 Oct 12, 2026 https://github.com/simstudioai/sim/pull/8913/commits/bad2dd72e9fbcd6f4de2cc26c4d873e1ebba2220
Clear filters https://github.com/simstudioai/sim/pull/8913/files
Please reload this pagehttps://github.com/simstudioai/sim/pull/8913/files
Please reload this pagehttps://github.com/simstudioai/sim/pull/8913/files
list-query.test.ts https://github.com/simstudioai/sim/pull/8913/files#diff-7d121e037e1d7fac4e3631eb92560fad2ef131450d8a6cfe7a6f456040ac70ef
list-query.ts https://github.com/simstudioai/sim/pull/8913/files#diff-32aecd996eadcd96f7be5ec1b731ed5e4221e4d9114ed295dbaa5f5fb13648f0
public-filters.ts https://github.com/simstudioai/sim/pull/8913/files#diff-b34879ea4bf36602ec9dfd8cbca5ace76150572a098628a6bc05a7c07ed3eef1
public-queries.integration.ts https://github.com/simstudioai/sim/pull/8913/files#diff-8e313243a29e5bfa2aafc07053639a7301f08b60f161f6290519b08e439dca77
public-queries.test.ts https://github.com/simstudioai/sim/pull/8913/files#diff-39998dacfd90aba947e521c259461596cdb9f19bfdb3f997ef2c9807e05aed4d
public-queries.ts https://github.com/simstudioai/sim/pull/8913/files#diff-57e27427633a23e96c03079344c9fbb124cbe4dc3d0959a765030d69027b7100
0408_index_alignment.sql https://github.com/simstudioai/sim/pull/8913/files#diff-779102eb01a4e93afa55458651a4214572d3b88c5e12ec98b0a02ee08df29458
0408_snapshot.json https://github.com/simstudioai/sim/pull/8913/files#diff-a2160f5af827c03db328551fe9f2497ba3e12126e1766c29e7f095398f900770
_journal.json https://github.com/simstudioai/sim/pull/8913/files#diff-37150cc65ad16ee6fbc5fa318fc096be7730e16d63eaf863e3df5521b7030649
schema.ts https://github.com/simstudioai/sim/pull/8913/files#diff-9a959e2ce3cb4c86957bbae021d06eae364f7b0cb18964f5873bab53220af928
apps/sim/lib/api/list-query.test.tshttps://github.com/simstudioai/sim/pull/8913/files#diff-7d121e037e1d7fac4e3631eb92560fad2ef131450d8a6cfe7a6f456040ac70ef
View file https://github.com/simstudioai/sim/blob/bad2dd72e9fbcd6f4de2cc26c4d873e1ebba2220/apps/sim/lib/api/list-query.test.ts
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/simstudioai/sim/pull/8913/{{ revealButtonHref }}
https://github.com/simstudioai/sim/pull/8913/files#diff-7d121e037e1d7fac4e3631eb92560fad2ef131450d8a6cfe7a6f456040ac70ef
https://github.com/simstudioai/sim/pull/8913/files#diff-7d121e037e1d7fac4e3631eb92560fad2ef131450d8a6cfe7a6f456040ac70ef
https://github.com/simstudioai/sim/pull/8913/files#diff-7d121e037e1d7fac4e3631eb92560fad2ef131450d8a6cfe7a6f456040ac70ef
https://github.com/simstudioai/sim/pull/8913/files#diff-7d121e037e1d7fac4e3631eb92560fad2ef131450d8a6cfe7a6f456040ac70ef
apps/sim/lib/api/list-query.tshttps://github.com/simstudioai/sim/pull/8913/files#diff-32aecd996eadcd96f7be5ec1b731ed5e4221e4d9114ed295dbaa5f5fb13648f0
View file https://github.com/simstudioai/sim/blob/bad2dd72e9fbcd6f4de2cc26c4d873e1ebba2220/apps/sim/lib/api/list-query.ts
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/simstudioai/sim/pull/8913/{{ revealButtonHref }}
https://github.com/simstudioai/sim/pull/8913/files#diff-32aecd996eadcd96f7be5ec1b731ed5e4221e4d9114ed295dbaa5f5fb13648f0
https://github.com/simstudioai/sim/pull/8913/files#diff-32aecd996eadcd96f7be5ec1b731ed5e4221e4d9114ed295dbaa5f5fb13648f0
https://github.com/simstudioai/sim/pull/8913/files#diff-32aecd996eadcd96f7be5ec1b731ed5e4221e4d9114ed295dbaa5f5fb13648f0
https://github.com/simstudioai/sim/pull/8913/files#diff-32aecd996eadcd96f7be5ec1b731ed5e4221e4d9114ed295dbaa5f5fb13648f0
https://github.com/simstudioai/sim/pull/8913/files#diff-32aecd996eadcd96f7be5ec1b731ed5e4221e4d9114ed295dbaa5f5fb13648f0
https://github.com/simstudioai/sim/pull/8913/files#diff-32aecd996eadcd96f7be5ec1b731ed5e4221e4d9114ed295dbaa5f5fb13648f0
https://github.com/simstudioai/sim/pull/8913/files#diff-32aecd996eadcd96f7be5ec1b731ed5e4221e4d9114ed295dbaa5f5fb13648f0
https://github.com/simstudioai/sim/pull/8913/files#diff-32aecd996eadcd96f7be5ec1b731ed5e4221e4d9114ed295dbaa5f5fb13648f0
https://github.com/simstudioai/sim/pull/8913/files#diff-32aecd996eadcd96f7be5ec1b731ed5e4221e4d9114ed295dbaa5f5fb13648f0
apps/sim/lib/logs/public-filters.tshttps://github.com/simstudioai/sim/pull/8913/files#diff-b34879ea4bf36602ec9dfd8cbca5ace76150572a098628a6bc05a7c07ed3eef1
View file https://github.com/simstudioai/sim/blob/bad2dd72e9fbcd6f4de2cc26c4d873e1ebba2220/apps/sim/lib/logs/public-filters.ts
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/simstudioai/sim/pull/8913/{{ revealButtonHref }}
https://github.com/simstudioai/sim/pull/8913/files#diff-b34879ea4bf36602ec9dfd8cbca5ace76150572a098628a6bc05a7c07ed3eef1
https://github.com/simstudioai/sim/pull/8913/files#diff-b34879ea4bf36602ec9dfd8cbca5ace76150572a098628a6bc05a7c07ed3eef1
apps/sim/lib/logs/public-queries.integration.tshttps://github.com/simstudioai/sim/pull/8913/files#diff-8e313243a29e5bfa2aafc07053639a7301f08b60f161f6290519b08e439dca77
View file https://github.com/simstudioai/sim/blob/bad2dd72e9fbcd6f4de2cc26c4d873e1ebba2220/apps/sim/lib/logs/public-queries.integration.ts
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/simstudioai/sim/pull/8913/{{ revealButtonHref }}
Please reload this pagehttps://github.com/simstudioai/sim/pull/8913/files
Please reload this pagehttps://github.com/simstudioai/sim/pull/8913/files
https://github.com
Termshttps://docs.github.com/site-policy/github-terms/github-terms-of-service
Privacyhttps://docs.github.com/site-policy/privacy-policies/github-privacy-statement
Securityhttps://github.com/security
Statushttps://www.githubstatus.com/
Communityhttps://github.community/
Docshttps://docs.github.com/
Contacthttps://support.github.com?tags=dotcom-footer

Viewport: width=device-width


URLs of crawlers that visited me.