SELECT * FROM table1 where name= ' Zhangsan ' and TID > 10000and implementation:SELECT * FROM table1 where TID > 10000 and name= ' Zhangsan 'Some people do not know the execution efficiency of the above two statements is the same, because if it is simple to read from the statement, the two statements are indeed different, if the TID is an aggregation index, then the following sentence only from the table after 10,000 records to find the line , and the previous sentence to look up from the whole
Label:
MySQL has a wide range of performance optimizations:Index optimization, query optimization, query caching, Server Setup optimization, operating system and hardware optimization, application-level
Index is the most important tool for improving the query speed. Of course there are other technologies available for use, but in general, the biggest performance difference is the correct use of indexes. In the MySQL Mail List, people often ask for methods that make queries run faster. In most cases, we should doubt whether there are any indexes on the data table, and usually solve the problem immediately a
Tags: no SQL judgment added effect strong info return statisticsSQL execution efficiency has a significant impact on system usage, and this article summarizes some of the solutions to Oracle optimization problems that are encountered in troubleshooting problems, or the daily learning gains. 1.Oracle SQL execution Order the parsing of SQL syntax is from right to
in Oracle, namely v $ locked_object, v $ session, and dba_objects:
The v $ locked_object view records all locked objects in all sessions.
The v $ session view records information about all sessions.
Dba_objects is a collection of oracle user objects and System Objects. By associating this table, you can obtain detailed information about the locked objects.
Eg: Now I use the scott user to execute the DML St
Index is the most important tool for improving the query speed. Of course there are other technologies available for use, but in general, the biggest performance difference is the correct use of indexes. In the MySQL mail list, people often ask for methods that make queries run faster. In most cases, we should doubt whether there are any indexes on the data table, and usually MySQL optimizes MySQL queries i
using join query:
Select * from employee where first_name | ''| last_name = 'George Bush ';
The preceding statement can be used to check whether there are employees of George Bush. However, you must note that the system optimizer does not use indexes created based on last_name.
When the following SQL statement is used, the Oracle system can use an index created based on last_name:
Index optimization, query optimization, query caching, Server Setup optimization, operating system and hardware optimization, application-level optimization (Web server, caching), and m
techniques, which are described here.
This is well known, using bound variables, you can reuse the SQL execution plan, reduce the database CPU consumption.
This technique should also be known, that is, when deleting the entire table data, consider using truncate as much as possible. Because truncate is directly modifying the database dictionary, the Library table occupies the data space state to unused. This operation is fast. However, it is important to note that truncate is not like delete an
; registry> parameter file The character set must be consistent, but the language settings can be different. We recommend that you use English for language settings. If the character set is zhs16gbk, The nls_lang can be American_America.zhs16gbk. Involves three character sets,1. Character Set on the El server side;2. Character Set of oracle client;3. dmp file character set. During data import, the three character sets must be consistent before the da
Oracle data query using C # for SQL or ASP. When the query condition exists in Chinese , because the data server and client/natively have different character sets , the data table has data, but the data is not queried. However, data queries can be made using the same string as the Oracle
Many people do not know how SQL statements are executed in SQL Server. They are worried that the SQL statements they write will be misunderstood by SQL Server. For example:
Select * From Table1 where name = 'hangsan' and TID> 10000
And execution:
Select * From Table1 where TID> 10000 and name = 'hangsan'
Some people do not know whether the execution efficiency of the preceding two statements is the same, because the two statements are indeed different from the statement sequence. If TI
amount SELECT * from record where actiontime= to_date (' 19991201 ', ' YYYYMMDD ') (The difference is very obvious!The second palm avoids unnecessary type conversionsIt is important to avoid potential data type conversions as much as possible. If you compare character data with numeric data, Oracle automatically converts the character type with the To_number () function, which results in a full table scan.Example 2: Column col1 in table Tab1 is a cha
stability of database objects during use and the consistency of data, such as using latches (latch), locks (lock), and so on. Therefore, contention and the resources associated with these mechanisms can affect the performance of the database. In order to reduce this resource competition, it is possible to reduce resource contention and optimize database performance by adjusting the relevant initialization parameters of the database (such as db_block_lru_latches, Dml_locks).
4. Some common meth
Faster Oracle running-Oracle 10 Gb Performance Analysis and Optimization
Basic Information
Author: Tan HuaiyuanSeries name: itpub Technology seriesPress: Electronic Industry PressISBN: 9787121113253Mounting time:Published on: February 1, August 2010Start: 16Page number: 438More Wonderful Details: http://www.china-pub.com/196935More wonderful sample preemptive t
Article 1: how to optimize slow query SQL statements in MySQL56-Introduction to slow logs: in actual log analysis, there are usually a large number of slow logs, at the same time, there will be a large number of records for the same query. here we need to find the most problematic and optimized log in the actual log analysis, generally, the number of slow logs is large and the number of records in the same
Today, an oracle database is generated to mySQL. because the code is primitive and the database is accessed by JDBC, the paging query of the database cannot be found at once. Sorrow! First, let's take a look at the previously queried code: publicPageModelfindUserLis. Today, an oracle database is generated to mySQL, because the code is primitive and the database i
single memory table can have both a hash index and a B-tree index, even on the same data column.
Some types of comparisons cannot use indexes. If you perform a comparison operation simply by passing the value to a function (such as strcmp ()), indexing it is of no value. The server must calculate the function value of each data row, which excludes the use of indexes on the data columns.
Use the slow query (slow-
Index is the most important tool for improving the query speed. Of course there are other technologies available for use, but in general, the biggest performance difference is the correct use of indexes. In the MySQL Mail List, people often ask for methods that make queries run faster. In most cases, we should doubt whether there are any indexes on the data table, and usually solve the problem immediately a
There were no things left idle in the past two days, and the project was soon launched. I read all the SQL statements I wrote in the project.
With reference to the experience of optimizing SQL statements in previous years and the summary of SQL statement optimization methods on the Internet, and the powerful SQL analysis tool such as Oracle, We optimized the SQL
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.