Skip to content
Selectgo. Engineering Blog

Ideas and practices for better software.

With(NoLock) vs With(ReadPast)
Sql Server thg 9 17, 2026 2 min read EN VI

With(NoLock) vs With(ReadPast)

WITH (NOLOCK) and WITH (READPAST) are SQL Server table hints that manage concurrency differently — NOLOCK reads uncommitted (dirty) data, while READPAST skips locked rows, avoiding dirty reads but potentially missing data. With(NoLock) v...

By Huy Vũ
Editors' picks
With(NoLock) vs With(ReadPast)
Sql Server thg 9 17, 2026 2 min read EN VI

With(NoLock) vs With(ReadPast)

WITH (NOLOCK) and WITH (READPAST) are SQL Server table hints that manage concurrency differently — NOLOCK reads uncommitted (dirty) data, while READPAST skips locked rows, avoiding dirty reads but potentially missing data. With(NoLock) v...

By Huy Vũ
But NOLOCK Is Okay When My Data Isn't Changing, Right?
Sql Server thg 9 16, 2026 2 min read EN VI

But NOLOCK Is Okay When My Data Isn't Changing, Right?

I’ve already covered how NOLOCK gives you random results when you’re querying data that’s changing, and that’s a really powerful demo to show folks who think NOLOCK is safe to use in production. However, I’ve gotten a question from sever...

By Huy Vũ
Explore topics

One useful engineering note per article

Get an email when a new article is published. Confirm your address once; unsubscribe any time.

Fresh from the blog

Latest articles

Browse all articles
Using NOLOCK? Here's How You'll Get the Wrong Query Results.
Sql Server thg 9 16, 2026 2 min read

Using NOLOCK? Here's How You'll Get the Wrong Query Results.

Slapping WITH (NOLOCK) on your query seems to make it go faster – but what’s the drawback? Let’s take a look. We’ll start with the free StackOverflow.com public database – any one of them will do, even the 10GB mini one – and run this qu...

By Huy Vũ
But NOLOCK Is Okay When My Data Isn't Changing, Right?
Sql Server thg 9 16, 2026 2 min read EN VI

But NOLOCK Is Okay When My Data Isn't Changing, Right?

I’ve already covered how NOLOCK gives you random results when you’re querying data that’s changing, and that’s a really powerful demo to show folks who think NOLOCK is safe to use in production. However, I’ve gotten a question from sever...

By Huy Vũ
How to Make SELECT COUNT(*) Queries Crazy Fast
Sql Server thg 9 15, 2026 6 min read

How to Make SELECT COUNT(*) Queries Crazy Fast

When you run a SELECT COUNT(*), the speed of the results depends a lot on the structure & settings of the database. Let’s do an exploration of the Votes table in the Stack Overflow database, specifically the 2018-06 ~300GB version where ...

By Huy Vũ
How To Decide if You Should Use Table Partitioning
Sql Server thg 9 14, 2026 9 min read EN VI

How To Decide if You Should Use Table Partitioning

Great volumes have been written about table partitioning. It’s a complex feature and you can read for days to just understand how you might apply it. But will it improve performance for you? Table partitioning produces great benefits for...

By Huy Vũ