Skip to content
Author profile

Huy Vũ

Articles, ideas, and practical insights from Huy Vũ.

26 published articles

With(NoLock) vs With(ReadPast)
Sql Server thg 9 17, 2026 2 phút đọc 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ũ
Using NOLOCK? Here's How You'll Get the Wrong Query Results.
Sql Server thg 9 16, 2026 2 phút đọc

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 phút đọc 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 phút đọc

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ũ