What does SQL Server do between returning my first record and returning my last record?

Let's say I have a query that returns 10,000 records. When the first record returned, what can I assume about the status of my request?

  • Is it ready and just returns records from the server to my SSMS instance?
  • Is the request running on the server?
  • What causes 10,000 records to slowly return for one request and almost instantly for another?
+3
source share
3 answers

There is potentially some combination of server-side progressive processing, network data transfer, and client rendering.

10 000 , - , , .., - , / . , SSMS .

, , . , Management Studio , ..

+1

, . Navigational , , .

- , , (.. order by ). , , , .

0

- " ".

, , order by, (), . , , , . , , ( ) , .

order by , , .

" ", , , . , - some_column like '%something' . "%" , , some_column . something% %something% 100 1000 . , ( contains() like.

, , ( ). .

0
source

Source: https://habr.com/ru/post/1730440/


All Articles