Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings
This repository was archived by the owner on Aug 15, 2024. It is now read-only.
This repository was archived by the owner on Aug 15, 2024. It is now read-only.

Add WITH (ONLINE=ON) to MS SQL indexes creation #554

Copy link
Copy link
@MNF

Description

@MNF
Issue body actions

If we upgrade V2 to V3, we have existing database with millions of record and creating index may be time-consuming.
To anticipate it, Indexes IX_Streams_IdOriginal and IX_Streams_IdOriginalReversed (and other indexes as well) better to specify WITH (ONLINE=ON)

CREATE NONCLUSTERED INDEX IX_Streams_IdOriginal

Unfortunately it is required to add conditional logic as not all sql server editions support WITH (ONLINE) https://stackoverflow.com/questions/50407490/how-to-create-nonclustered-index-with-online-if-available

Btw, even WITH (ONLINE=ON) may cause blocks on the final stage
https://dba.stackexchange.com/questions/41181/why-does-create-index-with-online-on-block-access-to-the-table-over-a-period/50139#50139

Reactions are currently unavailable

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

      Morty Proxy This is a proxified and sanitized view of the page, visit original site.