开发者

Select Query Running slowly for a particular table

开发者 https://www.devze.com 2023-02-07 01:00 出处:网络
In my table, I have more than 300 records in a table. If, for example, I run select top 200 * from 开发者_Python百科tablename

In my table, I have more than 300 records in a table.

If, for example, I run

select top 200 * from 开发者_Python百科tablename

it runs fast. But if I run

select top 301 * from tablename

It's executing for a long time.....

Also, I can't run the following query at all:

select * from tablename

...it is too slow...

I want to the delete the records after 301 in that table.


How wide is your table? What's the table definition look like?

If you have an identity column you could just run this:

delete from dbo.Table where TableID>301
0

精彩评论

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