开发者

Unable to select all data from a table in SQL Server

I'm facing something really strange.

In a table (T) containning 400 000 records.

When selecting this:

select top 150000 * from 开发者_高级运维T

I got answer in 3 secondes

but if I take them all, I stop the request after 5 minutes without having the result.

Any idea about this problem ?

thx,

Pit


The main area to look for the cause are:

  1. Disk IO
  2. Cache hit ratio
  3. A block on a page of the table because of other processes ( Add WITH(NOLOCK) table hint to your query)
  4. Network bottleneck (if going to client off the db server)

I agree with Arman that the indexes are not needed and each page of the table must be read.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜