Skip to content

Allow configuring index direction for TimeStamp.NonClusteredIndex #636

@gumbarros

Description

@gumbarros

When configuring the SQL Server sink using ColumnOptions.TimeStamp.NonClusteredIndex = true, the sink creates a non-clustered index on the TimeStamp column, but the index is always ascending.

Like this:

CREATE NONCLUSTERED INDEX [IX1_Logs] ON [Infinity].[Logs]
(
	[TimeStamp] ASC
)

There is currently no way to specify index direction (e.g., DESC) through the API. This limits performance optimizations, especially for queries retrieving the most recent logs first.

Proposal:
Extend the TimeStamp column options to allow configuring the index direction. For example:

columnOptions.TimeStamp.NonClusteredIndex = true;
columnOptions.TimeStamp.NonClusteredIndexDirection = IndexDirection.Descending;

Use case:

  • Optimize queries for latest logs (ORDER BY TimeStamp DESC).
  • Improve performance on large log tables.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions