如何确定查询返回的行数 [英] How to determine the number of rows return by a query

查看:107
本文介绍了如何确定查询返回的行数的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我的查询在返回结果之前需要超过3个小时。我已经根据DTA的建议添加了索引。我不知道我该怎么办呢。请给我建议..谢谢



我尝试过:



使用Profiler和DTA然后将索引添加到表

i have a query that takes more than 3 hours before it return the results. i have already add indexes based on the suggestion of DTA. and i don't know what else should i do with it. please give me advice.. thanks

What I have tried:

Use Profiler and DTA then add indexes to the tables

推荐答案

首先估计您的查询执行是否花费的时间超出预期,那么你可以试试这个:分析慢速运行查询的清单 [ ^ ]。
You have first to estimate if your query execution is taking more time than expected, then you could try this: Checklist for Analyzing Slow-Running Queries[^].


代码项目知识库 [ ^ ]内容充满了文章/提示,对您有所帮助。例如:

如何提高查询性能 [ ^ ]

提高绩效使用SQL Server的查询:第1部分 [ ^ ]

使用SQL Server提高查询性能:第2部分 [ ^ ]

^ ]



试试!
Code Project Knowledge Base[^] is full of articles/tips which can be helpful for you. For example:
How to Improve Performance of Query[^]
Improving the performance of queries using SQL Server: Part 1[^]
Improving the performance of queries using SQL Server: Part 2[^]
Improving SQL query performance using JOIN[^]

Try!


这篇关于如何确定查询返回的行数的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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