Assume that there is already some data in the table. Now we need to use the stored procedure to keep doubling the existing data and create a large amount of data CREATEORREPLACEPROCED.
Assume that there is already some data in the table. Now we need to use the
value cannot be obtained during ASC sorting. Test results:
2 method: 156 ms 156 ms 180 ms 470 ms 156 ms 1 *
From the test results, the use of the 2-way method can indeed improve efficiency and make efficiency more stable. I added another 159,999th-page test with only 296 ms, and the effect is quite good!
Below is the code for using select max using the binary method, which is quite complete.
The Code is as follows:
--/* ----- Stored Procedure paging
The code in the CS file
Copy Code code as follows:
Watch video Three standards
Pass parameters from page.
int V1_biaozhou = Convert.ToInt32 (TextBox1.Text);
int v1_feizhi= Convert.ToInt32 (textbox4.text);
int V2_biaozhou = Convert.ToInt32 (TextBox2.Text);
int v2_feizhi= Convert.ToInt32 (textbox5.text);
int V3_biaozhou = Convert.ToInt32 (TextBox3.Text);
int v3_feizhi= Convert.ToInt32 (textbox6.text);
Job marking (article)
int Z1_biaozhun=convert. ToInt32 (TextBox7. Tex
efficiency is low.We recommend that you add primary keys and indexes during optimization to improve query efficiency.
The SQL query Analyzer displays a comparison: My conclusion is:Paging solution 2: (using more than ID and select top pages) is the most efficient. You need to splice an SQL statementPaging solution 1: (using not in and select top pages) The efficiency is second, and SQL statements need to be spliced.Paging solution 3: (using SQL cursor Stor
simplified MySQL data stored in the CSV file.Common mode value CombinationsR or RT default mode, text mode read RB binary file w or wt text mode write, open before file storage is emptied WB binary write, file storage is also emptied a append mode, can only be written at the end of the file A + read-write mode, Write can only be written at the end of the file w+ can read and write, and A + is th
MySQL is easy to use, but it is prone to Chinese garbled characters. The following lists several common Chinese garbled characters in Java Web development: 1. JSP page display problems 2. Number of MySQL stored
MySQL is easy to use, but it is prone to Chinese garbled characters. The following lists several common Chinese garbled characters in Java Web development: 1. JSP page display problems 2. Number of MySQL st
So it's best to page through the data, if this is the use of stored procedures to pagination. The following is a stored procedure for data paging using the employee table in the pubs database, which you can refer to to create your own stored procedures based on the actual si
OK, first create a database: data_test, and create a table: tb_testtable in this database.Create Database data_test -- create database data_test
Go
Use data_test
Go
Create Table tb_testtable -- create a table
(
Id int identity (1, 1) primary key,
Username nvarchar (20) not null,
Userpwd nvarchar (20) not null,
Useremail nvarchar (40) null
)
Go
Then we insert 2000000 data records into the data table:-- Inser
1. Store the data in the collection into a text file case:Requirement: To store string data in the ArrayList collection into a text file?(1) Analysis:Through the meaning of the topic, we can know some of the following things,A string is stored in the ArrayList collection.Traverse the ArrayList collection to get the data.It is then
The use of data types in database programming can improve the reusability of code. They are often used in methods and stored procedures. Using the data type, we can avoid defining a bunch of parameters in the stored procedure, which is the equivalent of the object-oriented language. An object is passed into a method, a
How iOS app data is stored (XML attribute list-plist)One, the iOS application common data storage way1.plist (XML attribute list archive) 2. Preferences 3.NSKeydeArchiver Archive (store custom objects) 4.sqlite3 (database, relational database, cannot directly store objects, to write some database statements, to disassemble the object storage) 5.Core
The data in the ORACLE Stored Procedure table is overwritten and restored. The old Stored Procedure overwrites the new stored procedure. As a result, all the previously used functions are 0. Therefore, the stored procedure is restored by performing the following steps: log o
1.plist attribute List>1. Applicable to: Only some of the classes brought in from the foundation framework, such as: Nsstring/nsarray/nsdicionary/nsset/nsnumber/nsdata>2. The Writetofilexxx method of the calling object can be written to the file>3. The Xxxwithcontensoffile method of the calling object can read the object contents from the file2. Preference Settings>1. The essence or the method of plist attribute list is stored>2. Access is very simple
[SQL]USE [test]GO/***** Object: StoredProcedure [dbo]. [pro_GenerateCheckInput_webControl] script Date: 08/13/2012 10:10:16 ******/SET ANSI_NULLS ONGOSET QUOTED_IDENTIFIER ONGO/*************************************** **************** DECRIPTION: A Stored Procedure for generating code (c # Checking input data and web interface controls)** If the name is greater than two characters and ends with a cd or id, u
For the development platform, if the data storage has good support, then the development of the application will have a great role in promoting.
In general, there are three ways to store data: One is a file, one is a database, and the other is a network. Where files and databases may be used a little more, the file is easy to use, the program can define its own format; The database used a bit annoying lock
access|application| Stored Procedures
Today, a friend asked me how to get the return value of the stored procedure in the Data Access Application block, and I found that I did not mention this in my previous article, and now to add, the specific solution is as follows:
1, first set up a stored procedure with a return v
1. Create Database Liezui_Test ID int primary key auto-IncrementTitle varchar (100)ReadNum int2. Insert 1 million data records into the databaseDeclare @ I intSet @ I = 1While I BeginInsert into Liezui_Test (Title, ReadNum) values ('total execution statistics', @ I)Set @ I = @ I + 1EndGODeclare @ I intSet @ I = 1While I BeginInsert into Liezui_Test (Title, ReadNum) values ('towels are prone to harmful bacteria because they are often wet. ', @ I)Set @
There is often a large amount of data in your project that is saved to the database, such as saving it with just one table. The preferred solution is to create dynamic tables by date to hold the data. With a dynamic stored procedure as the preferred option, a date calculation in a SQL Server stored procedure, and a dat
1, Sharedpreferences is the most easily understood data storage technology in Android, in fact sharedpreferences processing is a key-value (key value pair). Sharedpreferences is often used to store some lightweight datapublic void Setsharevalue () {Instantiate the Sharedpreferences object (the first step) to the name of the local XML file---TestSharedpreferences mysharedpreferences = getsharedpreferences ("Test", activity.mode_private);Instantiate the
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.