SQL Server has trouble counting 15
select top 1 * from email_process_smtp (nolock) order by email_added desc
returns in 0 or 1开发者_JS百科 seconds.
select top 10 * from email_process_smtp (nolock) order by email_added desc
returns in 0 or 1 seconds.
select top n * from email_process_smtp (nolock) order by email_added desc
where n = 11 to 14, takes 0 or 1 second
select top 15 * from email_process_smtp (nolock)
order by email_added desc
takes over 10 seconds
Any ideas why ?
email_added is a datetime field.
SQL Server version : Microsoft SQL Server 2000 - 8.00.2040 (Intel X86) May 13 2005 18:33:17 Copyright (c) 1988-2003 Microsoft Corporation Enterprise Edition on Windows NT 5.2 (Build 3790: Service Pack 2)
精彩评论