1. Compile and use MySQL in LinuxC LanguageAPIProgramError:
GCC testmysql. c
Pp. c :(. Text + 0x11): Undefined reference to 'mysql _ init'Pp. c :(. Text + 0x55): Undefined reference to 'mysql _ real_connect'Pp. c :(. Text + 0x65): Undefined
MySQL uses FRM and IDB files for data recovery sources MySQL Status: version:5.6.*Storage Engine: InnoDB storage engine to restore the database: Skill key to restore the table: Slot_value existing files: Back up all physical files (including ibdata1 and database skill the entire directory) tips: It 's best to find a development machine, Set up an extra MySQL data
The importance of reference integrity for the database does not need to be repeated. Next we will introduce the relationship between the MySQL foreign key and the reference integrity, and hope to help you learn about the MySQL foreign key.
Referential integrity is an important concept in database design. In different l
better effect is (uid,x,y). This is caused by the mechanism of MySQL processing sorting.20. Other Techniques:Http://www.cnblogs.com/nokiaguy/archive/2008/05/24/1206469.htmlHttp://www.cnblogs.com/suchshow/archive/2011/12/15/2289182.htmlHttp://www.cnblogs.com/cy163/archive/2009/05/28/1491473.htmlHttp://www.cnblogs.com/younggun/articles/1719943.htmlHttp://wenku.baidu.com/view/f57c7041be1e650e52ea9985.htmlFinally, you can use the Explain keyword to judge
Label:Transferred from: http://imysql.com/2015/05/24/mysql-optimization-reference-1.shtml This article has compiled some common methods of MySQL optimization, to do a simple summary sharing, to help those who do not have full-time MySQL DBA to do basic optimization work, as for the specific SQL optimization, most of th
Number
9
NVARCHAR2
VARCHAR (20)
NVARCHAR2
10
RAW
VARCHAR (20)
11
TIMESTAMP
UNKNOWN
Datetime
12
TIMESTAMP (6) with LOCAL time ZONE
Tinytext
Tinytext
13
TIMESTAMP (6) with time ZONE
Tinytext
Tinytext
14
Clob
Mediumtext
Mediumtext
15
LONG
Tinytext
Tinytext
16
NCLOB
MySql5.1 online Chinese Reference Manual this is a reference manual for MySQL database systems from version 5.1 to version 5.1.2-alpha. This manual is not applicable to earlier versions of MySQL, because there are many functional differences and other differences between MySQL
Cache Fragmentation rate = 20.46%, query cache utilization = 62.26%, query cache Hit Ratio = 1.94%, hit ratio is poor, probably write more frequently, and possibly some fragments.======================================================================================== Sort Usage mysql> Show Global status like ' sort% ';Sort_merge_passes 2Sort_range 18528Sort_rows 390838Sort_scan 3439 MySQL first tries to so
mysql| Reference | reference Manual | chinese
MySQL Chinese reference manual (catalog)
Reprinted translator: Yan Zi
return 〗〖 Forwarding
Translator: Yan Zi (clyan@sohu.com) Homepage: http://linuxdb.yeah.net
0 Translator Preface
1 General information of the
MySQL database s Tudent table)Mysqldump.exe-u root-p mysql > mysql_bak.sql (Backup Database for all tables in MySQL)Restoring a DatabaseC:\Program files\mysql\mysql Server 5.5\bin>mysql-u root-p
Label:If Table A's primary key is a field in table B, the field is called the Foreign key of Table B, table A is called the primary table, and table B is called from the table. Foreign keys are used to achieve referential integrity, and different foreign key constraints will allow the two tables to be tightly combined, especially if the modified or deleted cascade operation will make routine maintenance easier. Here we take MySQL as an example to summ
Referentialintegrity is an important concept in database design. In different lists of systems, the integrity of the reference is involved when all references of the database are legal or illegal. When the integrity of the reference exists, any association with the non-existent reCord becomes invalid, which prevents various errors and provides a more accurate and practical database.
Integrity of
to check and remove duplicate indexes. Periodically use the Pt-index-usage tool to check and remove low-frequency indexes; 5, the regular collection slow query log, with the Pt-query-digest tool analysis, can be combined with anemometer system slow query management in order to analyze slow query and follow-up optimization work; 6, can use Pt-kill kill long time of SQL request, Percona version has an option innodb_kill_idle_transaction also can realize this function; 7, using Pt-online-schema-ch
Pool Size: The maximum number of threads allowed in a thread pool, default 100Connectionreset: If the connection expires automatically reset, default FalseCharacterSet, CharSet: The character set used to request a connection to the server, default: NoneTreatblobsasutf8:binary blobs is treated as UTF8, default falseBlobasutf8includepattern: The matching mode of the column, once the match will be processed by UTF8, default: NoneSslmode: Whether SSL connection mode is enabled, default: Mysqlsslmod
solve the data consistency problem, high availability is incidentally implemented. Because PXC has write enlargement and short board effect, the concurrency efficiency will have a large loss, similar to the semi sync replication mechanism.Other high-availability scenarios
Based on NDB Cluster, there are still many defects and limitations in NDB, and it is not recommended to use in production environment.
Based on shared storage, on the one hand, the need for a less poor storage dev
search index in 8-9 seconds!Test again: search (id, vtype) or select id statement, also very sorry, 0.5 seconds.To sum up, if you want to reference limit with the where condition, you must design an indexPut first, the primary key used by limit is put 2nd bits, and only the select primary key can be used!
Solved the paging problem perfectly. If you can quickly return the id, there is hope to optimize the limit. According to this logic, millions of li
from collect where vtype = 1 limit 90000,10; very sorry, 8-9 seconds, did not go to the search index!Test again: Search (ID, vtype) or select ID statement, also very sorry, 0.5 seconds. To sum up, if you want to reference limit with the where condition, you must design an index and place where first. The primary key used by limit is placed at 2nd bits, and only the select primary key can be used!Solved the paging problem perfectly. If you can quickl
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.