Skip to main content

You are not logged in. Your edit will be placed in a queue until it is peer reviewed.

We welcome edits that make the post easier to understand and more valuable for readers. Because community members review edits, please try to make the post substantially better than how you found it, for example, by fixing grammar or adding additional resources and hyperlinks.

Required fields*

3
  • 4
    "the last piece of advice I would recommend would be to use NO LOCK on your SELECT queries ... you won't be preventing other reads or writes while you get what you need" - absolute codswallop and utterly dangerous advice. Not only do reads not typically block other reads, and not only does so-called NOLOCK still involve some locking (including so-called "latching"), but there is almost no case where reading data at that isolation level is desirable. Commented Jan 18, 2024 at 4:31
  • @Steve Removed that section. Commented Jan 18, 2024 at 12:58
  • SQL Server doesn't cache execution plans for views at all. It caches execution plans for statements (which may or may not reference a view) - i.e. if you have a view CREATE VIEW V1 AS SELECT C1, C2 FROM T then there is no meaningful distinction in plan caching behaviour between SELECT C1, C2 FROM T and SELECT * FROM V1 Commented Jan 18, 2024 at 17:17