Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add option for NOLOCK against MS SQL Server #3484

Closed
mkirzon opened this issue Apr 5, 2018 · 5 comments
Closed

Add option for NOLOCK against MS SQL Server #3484

mkirzon opened this issue Apr 5, 2018 · 5 comments
Labels
feature a feature request or enhancement

Comments

@mkirzon
Copy link

mkirzon commented Apr 5, 2018

When using dplyr directly against databases, it'd be helpful to have a NOLOCK options when configuring table connections.

This is a common practice in MSSQL to ensure complex queries don't lock the database for other read/writes. The tradeoff is that the read may be uncommited so this should be a toggleable option.

@edgararuiz-zz
Copy link

edgararuiz-zz commented Apr 6, 2018

@mkirzon - Good point
@batpigandme - Would you mind adding the feature tag as well? Thanks!

@batpigandme batpigandme added the feature a feature request or enhancement label Apr 6, 2018
@hadley
Copy link
Member

hadley commented May 20, 2018

Can someone please provide a link to a good NOLOCK description, and discuss where it fit most naturally in dbplyr? As an attribute of the tbl()?

@mkirzon
Copy link
Author

mkirzon commented May 21, 2018

There are 2 ways NOLOCK can be set - on individual tables (most common) or on a global level for the connection. Since the table-level usage is common, its support in dbplyr could be a good place to start and agree it fits most naturally in tbl().

I like this writeup on SQL Server NOLOCKs: https://www.mssqltips.com/sqlservertip/2470/understanding-the-sql-server-nolock-hint/
Here's the full reference from Microsoft: https://docs.microsoft.com/en-us/sql/t-sql/queries/hints-transact-sql-table?view=sql-server-2017

@ghost
Copy link

ghost commented Jun 25, 2018

This issue was moved by krlmlr to tidyverse/dbplyr/issues/113.

@ghost ghost closed this as completed Jun 25, 2018
@lock
Copy link

lock bot commented Dec 22, 2018

This old issue has been automatically locked. If you believe you have found a related problem, please file a new issue (with reprex) and link to this issue. https://reprex.tidyverse.org/

@lock lock bot locked and limited conversation to collaborators Dec 22, 2018
This issue was closed.
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
feature a feature request or enhancement
Projects
None yet
Development

No branches or pull requests

4 participants