Optimization technology of U MySQL DatabaseA comprehensive technology for MySQL optimization, mainly includingA: Rationalization of table Design (3NF compliant)B: Add appropriate index (index) [Four kinds: normal index, primary key index, unique
1. Description of the problemHow does a SQL work in a database? I believe a lot of people will be interested in this problem. Of course, to fully describe a SQL in the database life cycle, this is a very big problem, covering the SQL lexical parsing,
Optimization technology of U MySQL DatabaseA comprehensive technology for MySQL optimization, mainly includingA: Rationalization of table Design (3NF compliant)B: Add appropriate index (index) [Four kinds: normal index, primary key index, unique
1. InnoDB Engine IndexInnoDB supports indexes in the following ways:(1) Hash index(2) Full-text indexing(1) B + Tree index can be divided into clustered index and secondary indexThe creation of the index can be done in the CREATE TABLE statement, or
MySQL optimization using the index1, Index IntroductionAn index is a single spatial structure that exists alone. The data table can be indexed fields, and physical addresses, exist in a block, this space is ' index '.Query data from the index query
Gap Lock's internal locking principle gap Lock's front conditions:1 transaction ISOLATION level is Repeatable-read,innodb_locks_unsafe_for_binlog parameter is 0, and SQL Walk index is non-unique index2 The Transaction isolation level is the
The creation of the index can be done in the CREATE TABLE statement, or you can add indexes to the table by using the CREATE INDEX or ALTER TABLE alone. Deleting an index can be accomplished using ALTER TABLE or the DROP INDEX statement.(1) Create
--trunc (Date,[fmt])/trunc (Number[,decimals])SELECT sysdate from dual;SELECT TRUNC (sysdate) from dualSELECT TRUNC (12.34524,2) from dual; --12.34SELECT TRUNC ( -12.34724,2) from dual; --12.34SELECT TRUNC (12.34524,-1) from dual; --10--Returns the
Index:Query user_indexes can get more information about the indexes that the user has created.Query user_ind_partitions can get detailed information about the partition index that the user has created.Query User_ind_columns can get detailed
When talking about database performance optimizations, it is common to refer to "index", but many people do not really understand the index, and do not know why the index can speed up the retrieval, so that in practice, the index is not good to
For an understanding of the index refer to this post:Http://www.cnblogs.com/newpanderking/p/3781043.htmlTypes of indexes and creating posts:http://blog.csdn.net/xluren/article/details/32746183Advantages and disadvantages of the index:MySQL Tutorial:
Many friends in the operation of the database often use the index, through the index to get the data can really make this SQL statement run faster, but many people do not know why the use of the index will be faster, not to mention some of the
The difference between Oracle and MySQL
1. is a large database and MySQL is a small and medium-sized database, Oracle market share of 40%,mysql only about 20%, while MySQL is open source and Oracle price is very high Oracle.
2. Oracle supports large
Record LockA single index record is locked, the record lock is always indexed, not the records themselves, even if there is no index on the table, then InnoDB creates a hidden clustered primary key index in the background, so the hidden clustered
MySQL usually completes the distinct operation using groupby (essentially a sort action), and if the distinct operation is combined with the by-order operation, a temporary table is usually used. This can affect performance. In some cases, MySQL can
B-Tree
1. B-Tree definition
A B-tree is a balanced, multi-channel lookup tree that is useful in file systems.
Definition: An M-order B-tree, or an empty tree, or a M-fork tree that satisfies the following attributes:At most, there are M Shang
(1) Use the ALTER TABLE statement to create an index.The syntax is as follows:
The code is as follows
Copy Code
ALTER TABLE table_name ADD index index_name (column_list);ALTER TABLE table_name add unique
Why should I use the Mysiam engine when more select is executed? Especially in the case of an index
, this chapter relies on a practical application, analysis.
I. Preface:Online to see there is an interesting phenomenon, a 1W data volume
MySQL optimization three major directions① optimizes the server kernel where MySQL is located (this optimization is typically done by operations personnel).② tuning MySQL configuration parameters (my.cnf) This optimization requires a stress test to
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.