SQL查询变得非常慢

时间:2018-08-01 21:41:51

标签: sql optimization sql-server-2016

select  * from RmiMember 
  WHERE  [LastName] like ('li%') AND [FirstName] like ('ma%') 
  ORDER BY FullName asc

0.3秒

这个简单的查询需要0.300秒才能运行,但是一旦我添加前10位,它将变为3.0秒,如果将其更改为前100位,则需要0.300秒!

select top 10 * from RmiMember 
  WHERE  [LastName] like ('li%') AND [FirstName] like ('ma%') 
  ORDER BY FullName asc

3.0秒

0 个答案:

没有答案