Title: [Order 09][P3] Narrow snapshot projection and review snapshot indexes · Issue #66 · NEventStore/NEventStore.Persistence.SQL · GitHub
Open Graph Title: [Order 09][P3] Narrow snapshot projection and review snapshot indexes · Issue #66 · NEventStore/NEventStore.Persistence.SQL
X Title: [Order 09][P3] Narrow snapshot projection and review snapshot indexes · Issue #66 · NEventStore/NEventStore.Persistence.SQL
Description: Priority order Order: 09 of 09 Priority: P3 performance Problem Snapshot reads use SELECT *, and snapshot indexes should be reviewed after the snapshot-candidate query is fixed. Evidence: src/NEventStore.Persistence.Sql/SqlDialects/Commo...
Open Graph Description: Priority order Order: 09 of 09 Priority: P3 performance Problem Snapshot reads use SELECT *, and snapshot indexes should be reviewed after the snapshot-candidate query is fixed. Evidence: src/NEven...
X Description: Priority order Order: 09 of 09 Priority: P3 performance Problem Snapshot reads use SELECT *, and snapshot indexes should be reviewed after the snapshot-candidate query is fixed. Evidence: src/NEven...
Opengraph URL: https://github.com/NEventStore/NEventStore.Persistence.SQL/issues/66
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"[Order 09][P3] Narrow snapshot projection and review snapshot indexes","articleBody":"## Priority order\n\nOrder: 09 of 09\nPriority: P3 performance\n\n## Problem\n\nSnapshot reads use `SELECT *`, and snapshot indexes should be reviewed after the snapshot-candidate query is fixed.\n\nEvidence:\n\n- `src/NEventStore.Persistence.Sql/SqlDialects/CommonSqlStatements.resx:173`\n- `GetSnapshot` uses `SELECT *`.\n- Snapshot materialization needs `BucketId`, `StreamId`, `StreamRevision`, and `Payload`.\n\n## Impact\n\n- Current blast radius is low because `Snapshots` has only four columns.\n- Future schema additions could make this hot path read unnecessary data.\n- Existing snapshot indexes may not match the corrected query shape from #59.\n\n## Mandatory test-first workflow\n\n- Add tests first that verify snapshot materialization still works with explicit projections.\n- Use existing snapshot acceptance tests as the behavioral contract.\n- Add or document query-plan checks before changing provider indexes.\n- Do not change schema/indexes until the expected query behavior is covered.\n\n## Proposed action\n\n- Select explicit snapshot columns instead of `SELECT *`.\n- After #59, review whether `IX_Snapshots_Stream_Revision` should include `BucketId` first or be replaced by `(BucketId, StreamId, StreamRevision)` depending on provider plans.\n\n## Acceptance criteria\n\n- Snapshot reads return the same objects as before.\n- Provider tests pass for the touched SQL dialects.\n- Any index change is justified by a query-plan comparison or clear provider-specific reasoning.\n\nSource: `docs/Project-Analysis-Issue-Drafts.md`.","author":{"url":"https://github.com/AGiorgetti","@type":"Person","name":"AGiorgetti"},"datePublished":"2026-06-11T09:22:06.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":0},"url":"https://github.com/66/NEventStore.Persistence.SQL/issues/66"}
| route-pattern | /_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format) |
| route-controller | voltron_issues_fragments |
| route-action | issue_layout |
| fetch-nonce | v2:e3655f1e-67be-43a3-6214-a5fc1c4ffa96 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | EBD8:3D3A2:111BD4F:16F68F6:6A4D8BC6 |
| html-safe-nonce | 90377ef90b1734f896b018759d06618c0f4d7cf5a924cd225a056af774c87842 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJFQkQ4OjNEM0EyOjExMUJENEY6MTZGNjhGNjo2QTREOEJDNiIsInZpc2l0b3JfaWQiOiIxODM0MDIxMDEwNzgyNjUzMzgyIiwicmVnaW9uX2VkZ2UiOiJpYWQiLCJyZWdpb25fcmVuZGVyIjoiaWFkIn0= |
| visitor-hmac | fb9a31fb6c6daba23e42f97025118d75b02814be10a95abbb0bd551c92fdd234 |
| hovercard-subject-tag | issue:4639071594 |
| github-keyboard-shortcuts | repository,issues,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/NEventStore/NEventStore.Persistence.SQL/66/issue_layout |
| twitter:image | https://opengraph.githubassets.com/dc04c58ac52e510f0f60449ab48b919e625b7f5fac1ebae21a749d24ad85dfdd/NEventStore/NEventStore.Persistence.SQL/issues/66 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/dc04c58ac52e510f0f60449ab48b919e625b7f5fac1ebae21a749d24ad85dfdd/NEventStore/NEventStore.Persistence.SQL/issues/66 |
| og:image:alt | Priority order Order: 09 of 09 Priority: P3 performance Problem Snapshot reads use SELECT *, and snapshot indexes should be reviewed after the snapshot-candidate query is fixed. Evidence: src/NEven... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | AGiorgetti |
| hostname | github.com |
| expected-hostname | github.com |
| None | 9f8758a3953dfe943439713a6fa4f90d542a3431f10e861ca03dd7f39009f320 |
| turbo-cache-control | no-preview |
| go-import | github.com/NEventStore/NEventStore.Persistence.SQL git https://github.com/NEventStore/NEventStore.Persistence.SQL.git |
| octolytics-dimension-user_id | 4486767 |
| octolytics-dimension-user_login | NEventStore |
| octolytics-dimension-repository_id | 36130556 |
| octolytics-dimension-repository_nwo | NEventStore/NEventStore.Persistence.SQL |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 36130556 |
| octolytics-dimension-repository_network_root_nwo | NEventStore/NEventStore.Persistence.SQL |
| turbo-body-classes | logged-out env-production page-responsive |
| disable-turbo | false |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | bffd5484f01713a661b03469b77678f72b6574ed |
| ui-target | canary-2 |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width