Reference: http://dinglin.iteye.com/blog/1681332Limit for the length of a single-column index(5.6 Inside the default cannot exceed 767bytes,5.7 not more than 3072bytes):The cause is 256x3-1=767. This 3 is the maximum character space (UTF8). However,
Test database: MySQL DatabaseINSTR (STR,SUBSTR) searches for the specified character (SUBSTR) in a string (STR) and returns the position (INDEX) of the specified character;STR is searched for stringSUBSTR the string you want to searchConclusion: In
[Mysqld]Datadir=/usr/local//mysql/data #数据存放位置Socket=/var/lib/mysql/mysql.sockUser=mysqlLower_case_table_names = 1 #是否忽略大小写 with a value of 1 ignoring case# Disabling Symbolic-links is recommended to prevent assorted security
ObjectiveThe database storage engine is the database's underlying software organization, and the Database management system (DBMS) uses the data engine to create, query, update, and delete data. Different storage engines provide different storage
Tables in MySQLA table is a structured file that can be used to store data of a particular type. A record in the table has a corresponding caption, which is called a table field.Various operations for tables in MySQL are created
12345
A self-connection is a use of a connection, but not a type of connection, because his nature is to use a table as two tables.MySQL sometimes needs to make a connection to itself (self-connect) in the information query, so we need to define an alias
Pressure measurement 1. View Machine Load
Top-load average 1m 5m 15m
Cat/proc/loadavg
is related to the number of CPUs, 1 load represents 1 CPUscat /proc/cpuinfo |grep processor
2.CPU usage Rate
Top US sy ID wa hi si
Introduction to a storage engineThe storage engine is a table type, and MySQL has different processing mechanisms depending on the table typeHttp://www.cnblogs.com/guoyunlong666/p/8491702.htmlTwo table IntroductionTable is equivalent to a file, a
Since the landing was already very popular in the way of landing, the relevance should also be considered in database design. General storage open_id, icons, nicknames is enough. The nickname should be special attention, otherwise it might be like
The syntax of a single-table querySELECT Field 1, Field 2 ... From table name WHERE condition GROUP by field have filter ORDER by field limit number of bars Second, the execution order of the
1. Insert Data Modea> INSERT into student (ID, name, age) VALUES (1, ' Zhangsan ', 3);--The string type should be enclosed in double quotes or single quotes, otherwise the error b> INSERT into student values (1, ' Zhangsan ', 3); --Omit
1. View MySQL versionMethod one: status;Method Two: Select version ();2. mysql start, stop, restart common commandsA, starting mode1. Start with service:[[Email protected]/]# Service mysqld Start (5.0 version is mysqld)[[Email protected] etc]#
There are times when we manipulate database tables, but when we insert data into a table, we encounter data that already exists in the table for that ID or data without that ID, insert it directly when there is no data for that ID, and then update
Introduction:
关于数据库优化,网上有不少资料和方法,但是不少质量参差不齐,有些总结的不够到位,内容冗杂偶尔发现了这篇文章,总结得很经典,文章流量也很大,所以拿到自己的总结文集中,积累优质文章,提升个人能力,希望对大家今后开发中也有帮助
1. Select the most applicable field propertiesMySQL is good at supporting large data volumes, but in general,
BackgroundBecause the blogger is responsible for testing the project requires a large database throughput, recently upgraded, updated a database middleware-mycat. Query some information, understand that this is Ali's an open source project, based on
Horizontal splitting of database tables to optimize database structureEach table structure after a horizontal split is the same, helping to solve the problem of too many single-table records.Split method:1 ID performs hash operationIf split into 5
Health into a field (not a table field) to record the sort "analogy is rownum in an Oracle database"One table in MySQL (table name: Stuscore)Fields are: ID (primary key), Stuid (school number), sname (student name), subject (course name), score
Tutorial on how to use mysqld_multi to deploy a single-host multi-instance, mysqlmysqld_multi
Preface
Everyone should have some experience. With the development of hardware, multi-core linux systems have become a general trend, while mysql is a
Mysql null value and mysqlnull
NULL is a type of "no type" value. It usually indicates "no value", "unknown value", "missing value", "Super border", and "not in it, in our daily use, it is easy to confuse NULL strings. Here we have roughly sorted
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