我在一个查询中面临问题。最简单的将是一步一步讲解:SQL Server - 提高在表中搜索值的性能
通过使用这样的查询起初我在colum1 table1中搜索一个具体数值,所以现在
select column1
from table1
where column1 in('xxx','yyy','zzz')
group by column1
having count(*) >3
:
查询#1我有一个来自column1的值的列表,该列表发生3次以上。
然后我需要使用在在另一个查询条件清单:
select column1, column2, column3
from table1
where column1 in (query 1)
当我使用的查询1的子查询不幸的是,执行实在是太慢了,我需要找到一个不同的方式来这。任何建议如何提高绩效?
最好的问候,并感谢您提前
索引可以帮助你在考虑。这里是更多的信息http://stackoverflow.com/questions/2955459/what-is-an-index-in-sql – Coder221