如何加快我使用col asc命令的查询 [英] How to quicken my query which uses order by col asc

查看:71
本文介绍了如何加快我使用col asc命令的查询的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我的查询非常简单但需要3分钟以上才能回复。



请提供减少时间的解决方案



这是我的查询:



 选择  top   1  * 来自 tr_RequestResponse 其中 premium>  0  订单  premium  asc  





即使我尝试过min(premium),其中premium> 0。

仍然没有用很长时间



我尝试过:



i尝试min(premium),其中premium> 0。

仍然没有用很长时间

解决方案

使用 SQL索引 [ ^ ]



SQL索引 [ ^ ]



数据库索引如何工作k? [ ^ ]

My query is so simple but taking more than 3mins to respond.

please provide solution to reduce time

Here is my query :

select top 1 * from tr_RequestResponse where premium > 0 order by premium asc



Even i tried min(premium) where premium >0 .
still no use taking long time

What I have tried:

i tried min(premium) where premium >0 .
still no use taking long time

解决方案

use SQL Index[^]

SQL Indexes[^]

How do database indexes work?[^]


这篇关于如何加快我使用col asc命令的查询的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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