开发者

Footprints SQL Server

What does it mean by footprints in SQL Server?

开发者_运维百科

here's a snippet from MSDN "reduce the lock footprint of expensive queries" LINK


The footprint in this case means the number of different locks being made. e.g. the more locks - the larger the footprint.


"Footprint" doesn't specifically relate to SQL Server, but is a general term referring to the parts of a system that are affected by something else. It's the same "footprint" as is used in terms like "ecological footprint" or "carbon footprint". In this case, it is saying that queries can lock other tables just by virtue of running, and this can block other queries from accessing the same data. Thus the "footprint" of a query that affects a lot of tables is large and will slow the system down. But if you reduce the "footprint" so that it doesn't affect so much, then other queries will be free to run and improve performance.


It means that the resource usage will be lower. In the sepcific example, whatever they are talking about will use fewer locks. This is not a sql server thing - you could refer to a process reducing its memory footprint, or reducing the storage footprint of some data.


"Footprint" genereally refers to some sort of usage of limited resources. Think of it as "impact on the availability of something". If something has a large memory footprint, it affects the amount of free memory. If something reduces the lock footprint it means that it impacts the number of locks taken (positively, in this case).


This use of the word footprint referes to the amount of data that is locked by your query, a combination of the number and type of locks, one table level lock effecting more data then 10 row level locks.

Ways of decreasing your lock foot print would include

  1. touching less tables
  2. using a different isolation level
  3. using locking hints
  4. breaking the long running query into multiple shorter running querys so locks from the first part can be freed.
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜