Bored with a test of SQL Server

Source: Internet
Author: User
Test Code : Declare @ I Int
Set @ I =   3
Print   Getdate ()
While (@ I <   10000000 )
Begin
Insert   [ Eb_repair ] ( [ Re_id ] , [ Re_code_value ] , [ Re_cd_satisfition_no ] , [ Re_list_no ] , [ Re_in_list_date ] , [ Re_repair_site ] , [ Re_cus_name ] , [ Re_do_date ] , [ Re_machine_type ] , [ Re_machine_count ] , [ Re_product_place ] , [ Re_machine_no ] , [ Re_keep_repair_no ] , [ Re_invoice_no ] , [ Re_days ] , [ Re_incoicr_date ] , [ Re_buy_place ] , [ Re_repair_date ] , [ Re_fault ] , [ Re_fault_reason ] , [ Re_finish_date ] , [ Re_finish_days ] , [ Re_repairer ] , [ Re_add_menus_fee_count ] , [ Re_timeout ] , [ Re_all_fee ] , [ Re_all_part ] , [ Re_fee_rate ] , [ Re_total_fee ] , [ Re_change_logs ] , [ Re_is_rerepair ] , [ Re_old_list_no ] , [ Re_old_finish_date ] , [ Re_is_important_cus ] , [ Re_remark ] , [ Re_is_replace ] , [ Re_is_repeat ] , [ Re_is_unkown ] , [ Owner_id ] , [ Is_delete ] , [ Create_user_id ] , [ Create_date ] , [ Update_user_id ] , [ Update_date ] ) Values (@ I, ' 1 ' , ' 1 ' , ' 1 ' , ' 2003-12-14 00:00:00. 000 ' , 1 , ' 4444 ' , ' 2003-12-13 00:00:00. 000 ' , ' 123123123 ' , 123123 , ' 123 ' , ' 123 ' , ' 1222222222222222 ' , ' 222 ' , 2222 , ' 2003-12-12 00:00:00. 000 ' , ' 2 ' , ' 2003-12-12 00:00:00. 000 ' , ' 2003-12-12 ' , ' 2003-12-12 ' , ' 2003-12-12 00:00:00. 000 ' , 1212 , ' 2003-12-12 ' , 1212 , 1212.0 , 1212.000 , 1212.000 , ' 1212 ' , 1212.000 , 1212.000 , 1212 , ' 1212 ' , ' 2003-12-13 00:00:00. 000 ' , 12 , ' 2003-12-132003-12-132003-12-13 ' , 1 , 1 , 111 , ' 111 ' , 0 , ' 1111 ' , ' 2003-12-13 00:00:00. 000 ' , ' 1 ' , ' 2003-12-13 00:00:00. 000 ' )
Set @ I = @ I +   1
End

Print   Getdate ()

As a result, about 10000 records can be inserted in one minute. The CPU usage of the SQL Server process is 3%-60% of the memory usage, increasing from 20 mb.
the sub-engine performance is not very good,
c1.7
256 m
you can also try it. It's interesting!

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.