Skip to content

Parity: range-partition a document table by a non-tenant column (e.g. by date) — SQL Server equivalent of marten#4779 #211

Closed

Description

@jeremydmiller

Context

Marten #4779 (PR marten#4780) covers declaratively range-partitioning a single-tenant (or any) document table by an arbitrary, non-tenant column — the classic time-series retention pattern, e.g. a duplicated DateTimeOffset (BucketEnd) range-partitioned monthly so pruning old data is an instant DROP/SWITCH of a partition instead of a large DELETE.

On the Marten/PostgreSQL side the public entry point already existed (DocumentMappingExpression<T>.PartitionOn(member, cfg) over a duplicated column); the only real work was a Weasel partition-bound round-trip fix (weasel#318, shipped in Weasel.Postgresql 9.3.0).

Ask

Provide the equivalent for Polecat (SQL Server) so the document API has parity:

  • A way to declaratively partition a non-tenant document table on a caller-chosen (duplicated) member, including range partitioning by a date column.
  • SQL Server partitioning differs structurally from PostgreSQL (partition functions + schemes + a partitioning column, with SWITCH/SPLIT/MERGE RANGE for rolling partitions) rather than declarative child tables, so the API shape and migration story will differ from Marten's.

Notes

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions