限制我的SQL查询的响应时间 [英] Limit response time of my SQL query

查看:405
本文介绍了限制我的SQL查询的响应时间的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在这里张贴的问题对我的gridview的结合 - <一个href=\"http://stackoverflow.com/questions/5599704/bind-gridview-with-many-records/5599846#5599846\">Bind GridView中有许多记载。,提供在片刻的可见记录数。对性能的影响已经从20秒通过实施答案回落incredibily到2秒,但我仍知道它可以降低更多的限制。

I have posted a question here regarding binding of my gridview - Bind GridView with many records. with number of visible records at a moment. The performance hit has come down incredibily to 2sec from 20sec by implementing the answer but still i know it can be lowered to more limit.

喜欢 - 当我说取50条记录(客户)从DB时,它有一列其中获取对应于Orders表客户订单数(仅计算不完整的记录)。因此,它打50的查询到SQL Server为50家客户获取数据。有没有一种方法,我可以用一个查询??

Like- When i fetch say 50 records(Customers) at a time from DB, it has one column which fetch number of orders corresponding to that customer from Orders table(just count not complete record). So, it hit 50 queries to a SQL Server to fetch data for 50 customers. Is there a way where i can fetch complete data with a single query??

注意 - 如果有人需要看一个code,不要让我知道。 Hopefuly,我所提供的链接包含足够的codeBase的。

NOTE- If someone needs to look at a code, do let me know. Hopefuly, the link which i have provided contains enough codebase..

推荐答案

数据库索引是我所期待的。

这篇关于限制我的SQL查询的响应时间的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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