我正在查看从Microsoft Azure存储资源管理器导出的xel文件。
一个特定的查询:
select top 1 dist.Distance...
只能“影响”一行。没有top 1
,查询将永远不会返回超过10行。
但是xel文件读取该查询的受影响的行为210720。
这个数字代表什么?
编辑-添加完整查询
declare @Latitude float = 0,@Longitude float = 0
select top 1 dist.Distance, f.id, f.SEOPageTitle, f.SEOMetroCity, f.SEOCity1, f.SEOCity2, f.SEOCity3, f.MetaDescription, f.MetaKeywords
FROM f (NOLOCK)
join (select distinct f.id, min(dbo.CalculateDistance(@Latitude, @Longitude, z.Latitude, z.Longitude)) 'Distance'
FROM f2 (NOLOCK)
join FZipCode fz (NOLOCK) on f2.id = fz.FID
join (select distinct ZipCode, Latitude, Longitude from ZipCodes (NOLOCK)) z on z.ZIPCode = fz.ZIPCode
where f.Activated = 1 and dbo.CalculateDistance(@Latitude, @Longitude, z.Latitude, z.Longitude) <= 30
group by f2.id) dist on f.id = dist.FID
order by Distance
但是xel文件读取该查询的受影响的行为210720。这个数字代表什么?
* .xel文件是数据库审计文件。
SQL Server的最新版本在sys.fn_get_audit_file中具有新的列:
Column name | Type | Description
--------------- |--------|------------------------------
response_rows | bigint | Applies to: Azure SQL DB only
affected_rows | bigint | Applies to: Azure SQL DB only
不幸的是,这些专栏根本没有记录。
但是,我有一些假设:
affected_rows
该函数的column的值。response_rows
返回正确的值=1。它显示了发送到客户端应用程序的数据集中的列数。affected_rows
返回已更改的行数。也许与tempdb工作表有关,但它不显示发送给客户端的行数。更新2019-02-26:
@duckmike确认了假设。response_rows
具有值1,该值表示azure db发送给客户端的数据集中的行数。该列affected_rows
对于SELECT语句可能具有不同的含义。
本文收集自互联网,转载请注明来源。
如有侵权,请联系 [email protected] 删除。
我来说两句