microsoft / microsoft/durabletask-mssql

Missing Index

Open
#142 2 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
C#
Stars
105
Forks
36
PR merge metrics
No merged PRs in 30d

Description

Hello, we are using this provider since a few month with orchestration having more than 500k activities using Azure Sql and some index have been given by Azure Sql query performance:

One on NewEvents that is specialy used in our 500k activities orchestration

CREATE NONCLUSTERED INDEX [IX_NewEvents_TaskHub_VisibleTime] ON [dt].[NewEvents]
(
	[TaskHub] ASC,
	[VisibleTime] ASC
)WITH (STATISTICS_NORECOMPUTE = OFF, DROP_EXISTING = OFF, ONLINE = ON, OPTIMIZE_FOR_SEQUENTIAL_KEY = OFF) ON [PRIMARY]
GO

And 2 for dt.Instances


CREATE NONCLUSTERED INDEX [IX_Instances_ParentInstanceID] ON [dt].[Instances]
(
	[ParentInstanceID] ASC
)WITH (STATISTICS_NORECOMPUTE = OFF, DROP_EXISTING = OFF, ONLINE = ON, OPTIMIZE_FOR_SEQUENTIAL_KEY = OFF) ON [PRIMARY]
GO

CREATE NONCLUSTERED INDEX [IX_Instances_RuntimeStatus_Name] ON [dt].[Instances]
(
	[RuntimeStatus] ASC,
	[Name] ASC
)
INCLUDE([CreatedTime],[ExecutionID],[LastUpdatedTime]) WITH (STATISTICS_NORECOMPUTE = OFF, DROP_EXISTING = OFF, ONLINE = OFF, OPTIMIZE_FOR_SEQUENTIAL_KEY = OFF) ON [PRIMARY]
GO

I think for sure the first one should be added but not sure for the 2 on dt.Instances

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reviewing the proposed indexes on dt.NewEvents and dt.Instances and how Azure SQL reports their query performance. Determine which indexes are appropriate for the provider, then verify that the selected definitions are included and do not introduce unnecessary indexes.

Written by the indexing model from the issue text.

Assessment

Tech stack
azure, csharp, sql
Domain
database, performance
Issue type
Feature
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.