Skip to content

[Order 09][P3] Narrow snapshot projection and review snapshot indexes #66

@AGiorgetti

Description

@AGiorgetti

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/CommonSqlStatements.resx:173
  • GetSnapshot uses SELECT *.
  • Snapshot materialization needs BucketId, StreamId, StreamRevision, and Payload.

Impact

Mandatory test-first workflow

  • Add tests first that verify snapshot materialization still works with explicit projections.
  • Use existing snapshot acceptance tests as the behavioral contract.
  • Add or document query-plan checks before changing provider indexes.
  • Do not change schema/indexes until the expected query behavior is covered.

Proposed action

Acceptance criteria

  • Snapshot reads return the same objects as before.
  • Provider tests pass for the touched SQL dialects.
  • Any index change is justified by a query-plan comparison or clear provider-specific reasoning.

Source: docs/Project-Analysis-Issue-Drafts.md.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions