SQL Server 2000 paging statements

Source: Internet
Author: User
View code

 Set   Statistics Io On 
Set Statistics Time On
Go
Select Top 100000 * From ( Select Top 190000 * From Job_job Order By Jobid ASC ) As A Order By Jobid Desc
Go
Set Statistics Profile Off
Set Statistics Io Off
Set Statistics Time Off



Set Statistics Io On
Set Statistics Time On
Go
Select Top 100000 * From Job_job Where Jobid > ( Select Isnull ( Max (Jobid ), 0 ) From ( Select Top 190000 Jobid From Job_job Order By Jobid) As A) Order By Jobid
Go
Set Statistics Profile Off
Set Statistics IoOff
Set Statistics Time Off


Set Statistics Io On
Set Statistics Time On
Go
Select Top 100000 * From Job_job Where Jobid Not In ( Select Top 190000 Jobid From Job_job Order By Jobid) Order By Jobid
Go
Set Statistics Profile Off
Set Statistics Io Off
Set Statistics Time Off

Execution time

 

SQL Server Analysis and Compilation Time:
CPU time = 0 ms, occupied time = 0 ms.

(Row 3 is affected)
Table 'job _ job '. 1 scan count, 5944 logical reads, 0 physical reads, 0 pre-reads, 314078 lob logical reads, 0 physical reads, and 111 lob pre-reads.
Table 'worktable '. Scan count 0, logical read 0, physical read 0, pre-read 0, lob logical read 0, lob physical read 0, lob pre-read 0.
Table 'worktable '. Scan count 0, logical read 0, physical read 0, pre-read 0, lob logical read 0, lob physical read 0, lob pre-read 0.

SQL Server execution time:
CPU time = 1482 milliseconds, occupied time = 3745 milliseconds.
SQL Server Analysis and Compilation Time:
CPU time = 1 ms, occupied time = 1 ms.

SQL Server execution time:
CPU time = 0 ms, occupied time = 0 ms.

SQL Server execution time:
CPU time = 0 ms, occupied time = 0 ms.
SQL Server Analysis and Compilation Time:
CPU time = 0 ms, occupied time = 0 ms.

(Row 3 is affected)
Table 'job _ job '. Scan count 2, logical reads 5993 times, physical reads 0 times, pre-reads 0 times, lob logic reads 4274 times, lob physical reads 0 times, and LOB pre-reads 10 times.

SQL Server execution time:
CPU time = 62 ms, occupied time = 204 Ms.
SQL Server Analysis and Compilation Time:
CPU time = 0 ms, occupied time = 0 ms.

SQL Server execution time:
CPU time = 0 ms, occupied time = 0 ms.

SQL Server execution time:
CPU time = 0 ms, occupied time = 0 ms.
SQL Server Analysis and Compilation Time:
CPU time = 0 ms, occupied time = 0 ms.

(Row 3 is affected)
Table 'job _ job '. Scan count 2, logical reads 11933 times, physical reads 0 times, pre-reads 0 times, lob logic reads 4274 times, lob physical reads 0 times, and LOB pre-reads 10 times.

SQL Server execution time:
CPU time = 94 Ms, occupied time = 142 Ms.
SQL Server Analysis and Compilation Time:
CPU time = 0 ms, occupied time = 1 ms.

SQL Server execution time:
CPU time = 0 ms, occupied time = 0 ms.

SQL Server execution time:
CPU time = 0 ms, occupied time = 0 ms.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.