SubSonic3.0 plug-in paging query speed test

Source: Internet
Author: User

I have been using SubSonic3.0 for a while and have been looking for opportunities to test the paging speed of various queries and compare the query efficiency of the plug-in. So I wrote the test program yesterday, prepare data tables with records of 1 K, 1 W, 10 W, 50 W, and W, and perform a detailed test in the morning.

Local hardware configuration:

Intel Third Generation Core i5-3470 (3.2 GHz quad core) Asus P8B75-V 8g Kingston DDR3 1600MHz memory Seagate ST1000DM003-1CH162 (1 TB/7200 RPM)

Local Software Configuration:

Win7 + SQL2005 + VS2010

 

Test method: five common paging modes are used for query. The first, intermediate, and last pages are viewed, and the query time consumption is recorded. After 10 queries per page, the average value is obtained.

The stored procedure paging program uses a common online version.

 

Test code:

Test. aspx page

AutoEventWireup = CodeBehind = Inherits = %> <! DOCTYPE html PUBLIC> Test. aspx. cs File Code

PageIndex = pageSize = total = Page_Load (total = SqlHelper. executeScalarToInt (= labPageSize. text = total/pageSize + Button1_Click (= Button2_Click (= total/pageSize/Button3_Click (= total/swatch = selectfun = dt = (swatch. elapsedMilliseconds/dt2 = selectfun. selectDataTable <LoginLog> (, = (swatch. elapsedMilliseconds/tem = LoginLog. all (). skip (pageIndex-) * = (swatch. elapsedMilliseconds/count = SqlHelper. executeScalarToInt (dt3 = SqlHelper. getPageTable (, = (swatch. elapsedMilliseconds/dt4 = selectfun. selectDataTable <LoginLog> (, = (swatch. elapsedMilliseconds/View Code

 

LoginLog table structure

LoginLog table content (data is inserted randomly)

 

Test results (I forgot the order of the front-end when I sent the test results in the morning, and changed it to the following content)

  

Use "SubSonic T. the GetPaged function paging "queries are the fastest, while" SubSonic. query. the Select query paging speed is similar to that of the SubSonic Skip and Take method paging speed, ranking second. It can be seen that after the SubSonic is upgraded to 3.0, some unnecessary code is removed, the execution efficiency has also been improved.

In the SubSonic plug-in, the high usage is SubSonic. Query. Select (which can be encapsulated into generic calls). It is good to Query millions of records in about 0.6 seconds.

 

 

In addition, we attached the previously obtained SubSonic2.2 test results. The code was not carefully written in the previous test time, and the test was also casual. Therefore, the data we tested was not very accurate, however, in 2.2, the performance of queries is significantly different from that of SQL queries.

  

This article is original content. Keep the following information for reprinting.

As long as you want to learn and make progress together, if you are interested, you can add the Q group: SubSonic3.0 Learning Group (327360708) or Email to me (1654937 # qq.com ), I am very busy. If you have any questions, please leave a message first. Please forgive me for not replying in time.

For more questions about SubSonic3.0, refer to the blog:

 

 

Related Article

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.