Skip to content

Ability to do use table hints per query with MSSQL #8830

Closed

Description

@mccabemj

What are you doing?

If I want only one target table to require a lock-less state, this is not possible. You can only set the isolation level to the entire transaction. I'd like to be able to set the NOLOCK table hint (or any other table hint) to limit that isolation level or suggest other options to the specific query.

What do you expect to happen?

To be able to set NOLOCK on a specific select query, not the entire transaction

What is actually happening?

This is not possible.

I'd like to take a stab at this, if someone thinks it would be beneficial.

Dialect: mssql
Dialect version: 6.4.2
Database version: XXX
Sequelize version: 4.28.6
Tested with latest release: Yes

Activity

  1. janmeier commented on Jan 4, 2018

    @janmeier
    Member

    Sounds good to me, go for it!

  2. changed the title [-]Ability to do a NOLOCK table hint so that READUNCOMMITTED can be used on a single query[/-] [+]Ability to do use table hints per query with MSSQL[/+] on Jan 5, 2018
  3. mccabemj commented on Jan 5, 2018

    @mccabemj
    ContributorAuthor

    Upon coding this, I decided it would be better to allow other table hints, instead of just allowing NOLOCK. So I have changed the title and description of this issue and have done a pull request for the feature #8843

  4. sushantdhiman commented on Jan 5, 2018

    @sushantdhiman
    Contributor
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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