Read about performance comparison of sql and nosql databases, The latest news, videos, and discussion topics about performance comparison of sql and nosql databases from alibabacloud.com
During the work period, the problem of exporting and importing data between databases of different versions is often involved. Simply sort it out and compare the performance. You are welcome to discuss and supplement some methods that are missing.
00. Create a test environment
01. use SQL Server Import and Export Tool
02. Use generate scripts
03. Use BCP
statement optimizer that uses is null or is not NULL in the WHERE clause is not allowed to use the index.
3, in and exists
exists is far more efficient than in. The inside relates to the full table scan and range scan. Almost all of the in-operation Subcode queries are rewritten as subqueries using exists.
4, in the mass query as little as possible with the format conversion.
5, when in SQL SERVER 2000
If the stored procedure has only one parame
columns are frequently accessed at the same time, and each column contains duplicate values. You can consider creating a composite index;③ Composite indexes should try to overwrite key queries, and the leading column must be the most frequently used column.2. is null and IS NOT NULLNull cannot be used as an index. Any column containing null values will not be included in the index. Even if there are multiple columns in the index, as long as one of these columns contains null, this column will b
It's been a long time since you've written, and DBAs typically have to test server performance before the system is officially online.
For example, you have a lot of servers, some do Web server, some do cache server, some do file server, some do database server
Database server to do the server performance is relatively good, disk, memory, CPU and so on,
Then you need to test the
;,
②. Multiple columns are frequently accessed at the same time, and each column contains duplicate values. You can consider creating a composite index;
③ Composite indexes should try to overwrite key queries, and the leading column must be the most frequently used column.
2. is null and IS NOT NULL
Null cannot be used as an index. Any column containing null values will not be included in the index. Even if there are multiple columns in the index, as long as one of these columns contains null, t
the mass query as little as possible with the format conversion.
5, when in SQL SERVER 2000
If the stored procedure has only one parameter and is of the output type, the parameter must be given an initial value when the stored procedure is invoked, otherwise a call error will occur.
6. Order BY and Gropu by
Using the order by and group by phrases, any index contributes to the performance improvement of
Label:Text: Toward Dba[mssql] Improve access performance of databases from the perspective of SQL statementsRecently the company has come to a very tiger DBA 10几 years of experience here is called Cai Teacher. Let us share the precious wealth that Cai Lao has brought to us, with the consent of our Chua. Welcome other DBAs to shoot bricksDirectory1. What is the ex
Performance Comparison Between ISNULL and COALESCE in the paging mode of SQL Server, isnullcoalesce
Preface
In the previous section, we explained the data type and several notes in the string. In this section, we will continue to talk about the number of string lines, other content and interspersed content, short content, and in-depth explanation. (For details, s
flowersLet's look at an example before we introduce this section to subvert your thoughts and make you mad.' Jeffckywang ') As Col1So it's okay, we'll insert it into the table and look at the description of its columns' Jeffckywang ' 'dbo. IsNullExample2';The data in the table does exist, but the description of the column is nullable.SummarizeThe above focus on the differences between coalesce and ISNULL functions, through this section of the two scenarios and differences, we should have a lit
]. [CustID]) As RowNumber
from Sales.customers SC)
SELECT [address], [City], [region] from
salecustomer
WHERE RowNumber > @StartRow and RowNumber
Let's take a look at whether the two use SQL query statements and views have no performance differences? Come on, the test is.
From here we can see that the two are not different in terms of performance costs,
Five paging stored procedures based on SQL Server and Performance Comparison
In SQL Server database operations, we often use stored procedures to implement paging processing of the queried data to facilitate browsing by viewers.
Create a database data_Test:
Create database data_Test GO use data_Test GO create table tb_
MYSQL: SQL _CALC_FOUND_ROWS and count (*) performance comparison bitsCN.com
1. create a table:
// Overwrite the index create table if not exists 'Ben' ('A' int (10) unsigned not null AUTO_INCREMENT, 'BB' int (10) unsigned not null, 'CC' varchar (100) not null, primary key ('A'), KEY 'bar' ('BB ', 'A') ENGINE = MyISAM; // no overwriting index drop table if exists
Comparison of the Performance of a Group using the LinQ to SQL and non-LinQ methods.
A data table with 476550 data records. Group A field and sort it by the field. This requirement is implemented by using the methods of LinQ to SQL and non-LinQ respectively, and then let's take a look at the
@timediff datetimebeginsetnocounton;select@timediff=getdate()selectNBSP; * NBSP; from NBSP; ( Select NBSP; *,row_number () over (order NBSP; by NBSP; ID ASC NBSP; as Idrank NBSP; from NBSP; tb_ testtable) NBSP; as idwithrownumber NBSP; where idrank> @pageSize * @pageIndex and idrank selectdatediff(ms,@timediff,getdate())as耗时setnocount off;end---5、利用临时表及Row_numbercreate procedure proc_CTE --利用临时表及Row_number(@pageIndexint, --页索引@pageSizeint--页记录数)assetnocounto
In and Existsin is the appearance and the inner table as a hash connection, and exists is the external loop loop, each loop loop and then query the internal table. The assertion that exists is more efficient than in is inaccurate. If the two table size of the query is equal, then the in and exists are not very different. If one of the two tables is smaller, one is a large table, then the subquery table is large with exists, and the subquery table is small in: For example: Table A (small table),
time 3523.2 ms Four. SummarizeYou can see that the larger the amount of data, the larger the paging page number, the greater the impact on paging efficiency. Top of the page method out early, it is obviously because the data in the not too large, so if there is a good top paging method can leave a message below, I will also test. Row_number page method is relatively good, and sql2005 and above the database can be used, the audience range is larger, and the offset fecth
In SQL Server, the Inner Join and Outer Join operations between common tables are performed by the execution engine based on the selected columns and whether the data has an index, the selected data is selectively converted to one of the Loop Join, Merge Join, and Hash Join physical connections. Understanding these three physical connections is the basis for solving performance problems during table connect
In SQL Server, the inner join,outer Join that is common between tables and tables is executed by the engine based on the selected column, whether the data is indexed, and the selectivity of the selected data is converted to loop Join,merge Join,hash Join one of the three physical connections. Understanding that these three physical connections are the basis for solving performance problems when tables are c
A few SQL Server paging stored procedure writing and performance comparisonsStored procedure 5 Kinds of pagination, the following code is from the forgotten when from someone else that CTRL + C, so just as a collection, hope the author see don't Spray me.------Create a Database tutorial data_test-----Create DATABASE Data_testGoUse Data_testGoCREATE TABLE Tb_testtable--Creating tables(ID int identity (1,1) p
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.