我有以下查询,它扫描大表,不幸的是,我没有索引这一列,但我经常不得不运行查询这一列。有没有办法优化这个查询。select * from match with (nolock) where CURRENT_STATE in ('ACT','REJ')此表中的总记录为30280527条
如果我使用top子句而不是选择所有记录,会提高<
我的应用程序从SQL Server中的表中访问数据。考虑表名为PurchaseDetail和其他一些列。select查询具有以下where子句。1. name - name只有10000个值。2. createdDateTimeselect *where name in (~2000 name)
and createdDateTime我尝试使用这些推荐的
我有一个非常复杂的问题:select * from tbl_user ...and date_created between :date_fromand :todayorder by date_created desc当前查询足够快,因为where子句(仅在今天前3个月,date_from我必须删除这个子句,但是它会导致性能下降。如果先用‘’来计算date