SQL Server:在包含斑点的表上选择 [英] SQL Server: select on a table that contains a blob

查看:66
本文介绍了SQL Server:在包含斑点的表上选择的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我的应用正在查询-在其余查询中-一个具有blob列和其他元数据列(无其他LOB列)的表.

My app is querying - among the rest - a table that has a blob column and other metadata columns (no other LOB columns).

我已经读到,如果对象本身不太大,它可能仍存储在表中,而不是作为自身的链接.在这种情况下,即使这样的表上不包含blob,也要执行"SELECT"语句,例如:

I've read that if the object itself is not too big, it may still be stored inside the table and not as a link to itself. In this case, a 'SELECT' statement on such a table, even if it does not contain the blob, like:

SELECT Date FROM MyTable

可能仍会检索blob(仅在服务器中),因此执行起来需要更长的时间.

might still retrieve the blob (in the server only), thus taking longer to perform.

这是真的吗?谁能提供一个解释或一个链接?

Is this true? Can anyone provide an explanation or a link to one?

我的SQL背景很基础,对不起,我可能不太准确.

My background in SQL is rather basic, so I might not be accurate, sorry.

谢谢.

推荐答案

如果在日期列上创建非聚集索引,则可以通过扫描索引而不是扫描整个表来检索数据.您应该看到I/O下降了.

If you create a non-clustered index on the date column, then you can retrieve the data by scanning the index, instead of scanning the entire table. You should see I/O go way down.

这篇关于SQL Server:在包含斑点的表上选择的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆