Slow "Select" query with varchar (max)

I have a small table with 500 rows. This table contains 10 columns, including one varchar (max) column.

When I execute this query:

SELECT TOP 36 *
FROM MyTable
WHERE (Column1 = Value1)

It retrieves about 36 rows in 3 minutes. The varchar (max) columns contain 3,000 characters per row.

If I try to get only one line less:

SELECT TOP 35 *
FROM MyTable
WHERE (Column1 = Value1)

The query then retrieves 35 rows in 0 seconds.

In my client statistics, the bytes received from the server are:

95,292 for a request receiving data in 0 seconds

more than 200,000,000 to request data in 3 minutes

Do you know where it came from?

EDIT --- Here is my real code:

select top 36 *
from Snapshots
where ExamId = 212

select top 35 *
from Snapshots
where ExamId = 212

EDIT --- More on customer statistics

Two statistics that have a huge change:

Byte received from server: 66,038 Vs Over 2,000,000

TDS packets received from 30 Vs 11000 server

+5
3

Index ExamId select field1,field2,etc select * ....

0

, :

* , ExamId = ( 36 , ExamId = 212)

0

How to try the top 50, then the top 75, and then the top 100, to see if there is more increase again, because it seems that this is only this one row or maybe only certain rows in your table.

0
source

All Articles