MySQL Query optimization rules

1, please do not use distinct in select; #会用到临时表2, try not to select *, and you should query the specified number of fields that need to be used;3, do not federate on two large tables, either inline or out-of-union. For the case that two or more

MySQL ibdata1 Full disk space

MySQL master slave due to ibdata1 full disk space--Master and slave failureBecause innodb_file_per_table is set = 1,ibdata1 is still bursting to fill the disk spaceWhen the master/slave is disconnected, the IO thread is connected and the SQL thread

centos6.5 the process of installing MySQL

The most widely used database in Linux is MySQL, which uses online yum to install versions that lag behind several small versions of the MySQL site,So toss for a few weeks, finally in CentOS installed mysql5.6, after loading, to the entire operation

Asp.net+mysql the operation of the site data

1 usingSystem;2 usingSystem.Data;3 usingSystem.Text;4 usingSystem.Configuration;5 usingsystem.web;6 usingSystem.Web.Security;7 usingSystem.Web.UI;8 usingSystem.Web.UI.HtmlControls;9 usingSystem.Web.UI.WebControls;Ten

MySQL installation configuration uses

Compressed versionDownload the Oracle website mysql compression packI use 64 bits.1, extract to the specified directory disk such as: C:\mysql\mysql-5.7.10-winx642, new My.ini under Configuration directoryThe contents are as follows:[MySQL]# Set the

Memcached +mysql+php Example

PHPHeader("Content-type:text/html;charset=utf-8");$memcachehost= ' 127.0.0.1 '; $memcacheport= 11211; $memcachelife= 60; $memcache=NewMemcache;$memcache->connect ($memcachehost,$memcacheport) or die("Could Not Connect"); $query= "SELECT * FROM

MySQL installation and commissioning under CentOS

First, installation Yum installation:yum install-y mysql-server MySQL mysql-devel Set self-boot:chkconfig mysqld on Start MySQL:service mysqld start Set root password:/usr/bin/mysqladmin-u root password "123456" Installation

The role of MySQL Server-id

1, MySQL synchronization data is contained Server-id, to identify which server the statement was originally written from, so Server-id must have2, each synchronization of the slave on the master has a master thread, the thread is identified by the

MySQL Service installation: one-click installation script

#!/bin/sh#user : bobo365#date : 20160127make () {         if [  ' echo $? '  -eq 0 ] ;then                          Make                 else                          exit        fi}make_ins () {         if [  ' echo $? '  -eq 0 ] ;then              

MySQL Simple Connection Database mode

Os:centos 6.3db:5.5.14MySQL connects to the database in many ways:1, [[email protected] bin]#./mysql-uroot-p2, [[email protected] bin]#./mysql-uroot-p-h127.0.0.13, [[email protected] ~]# Su-mysql[Email protected] ~]$

Troubleshoot MySQL high-load issues

http://dngood.blog.51cto.com/446195/1150031 Log_slow_queries =/usr/local/mysql/var/slow_queries.log #慢查询日志路径 Long_query_time = Ten #记录SQL查询超过10s的语句 log-queries-not-using-indexes = 1 #记录没有使用索引的sql The reason is that

Hashing algorithms in the InnoDB storage engine in MySQL

The InnoDB storage engine uses a hashing algorithm to find the dictionary, and its conflict mechanism takes the form of a linked list, and the hash function uses the division hashing method. For a buffer pool page hash table, a page page in the

MySQL Execution state analysis

When you feel a problem with MySQL performance, you will usually look at the current execution state of MySQL and use show processlist to view it, for example:Where the State column information is very important, first look at the meaning of the

MySQL 5.7 Turn on parallel replication

To turn on multi-threaded replication, the default key parameters are two:Mysql> Show variables like ' slave_parallel_% ';+------------------------+---------------+| variable_name | Value |+------------------------+---------------+|

The relationship between MySQL primary key and index and the difference analysis

The relational database relies on the primary key, which is the cornerstone of the database physical pattern. There are only two uses of the primary key at the physical level:Uniquely identifies a row.As an object that can be effectively referenced

3.6 examples of common queries

3.6 examples of common queries Here are some examples of using MySQL to solve common problems. In some examples, the shop table is used to store the price of each item (item number) of a merchant (dealer. Assuming that each merchant has a fixed

Mysqlbinlog quick traversal of search records

Mysqlbinlog quick traversal of search records Target: The developer said that there was a data addition, but he did not know where to add it. In addition, the application function should not add such data. In order to find out the source, so I am

Bottom layer of Shopnc Model, bottom layer of shopncmodel

Bottom layer of Shopnc Model, bottom layer of shopncmodel Some time ago, a certain function was implemented, involving the query of data tables. After being tested locally and in the test environment, the process seemed to be smooth, think about

Sort out various SQL statements that are commonly used in mysql

Sort out various SQL statements that are commonly used in mysql ① Statistics are made by day and month, and daily trend changes are required.SQL queries the sum of values of all previous values on a daily (monthly) basis.Implementation: Compare

Import of large MySQL Data Volume and MySQL Data Volume

Import of large MySQL Data Volume and MySQL Data Volume First: in fact, the best way is to directly use: Mysqldump-u username-p Password Database Name In linux, we tested a data import of over 10 thousand rows, totaling 121 MB. In linux, the

Total Pages: 3233 1 .... 3205 3206 3207 3208 3209 .... 3233 Go to: GO

Contact Us

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

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.