在sqlserver查询处理中哪一个将提供group-by或distinct的最佳性能 [英] in sqlserver query processing which one will give best performance either group-by or distinct

查看:68
本文介绍了在sqlserver查询处理中哪一个将提供group-by或distinct的最佳性能的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

通常在sqlserver中使用group be和distinct编写的查询将给出唯一的元组值然后在查询处理中哪一个将提供最佳性能,无论是group-by还是distinct

解决方案

< blockquote>这取决于很多事情。尝试两种查询并查看执行计划。它应该告诉你发生了什么。


normally in sqlserver query prepared with group be and distinct will give unique tuple-values then in query processing which one will give best performance either group-by or distinct

解决方案

It depends on many things. Try both for your query and look at the execution plan. It should tell you what is happening.


这篇关于在sqlserver查询处理中哪一个将提供group-by或distinct的最佳性能的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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