"Go" MySQL Learning---optimization of SQL

"Original" https://www.toutiao.com/i6594314336913588743/How MySQL handles billions of data, the first phase-optimizing SQL statements1. Try to avoid using the! = or <> operator in the WHERE clause, or discard the engine for a full table scan using

MySQL Log analysis

由于日志文件是掌握数据库运行状态的重要参考,因此日志文件的维护也有十分重要的意义。 mysql的日志类型有二进制日志,错误日志,通用日志,慢查询日志。 Add log analysis to the moduleLog-bin=mysql_bin//binary logLog-error=/usr/local/mysql/data/mysql_error.log//error logGeneral_log=on//Turn on universal

MySQL Green Edition installation

1. Download the green version of the MySQL archive package. (Self-Baidu)2. Self-Planning Directory decompression3. InstallationNote: I have encountered two versions of the installation method (temporarily according to the extracted directory

Delete duplicate data in MySQL

First we need to know what data we repeat,///Step one: Group the data tables, GROUP by.The second step: after the conduct through having to limit filtering, the number of bars greater than or equal to 2Step three: make multiple table

MySQL database Getting Started command extension

Add primary KeyMysql> ALTER TABLE info add primary key (ID);Query OK, 0 rows affected (0.07 sec)records:0 duplicates:0 warnings:0Mysql> desc Info; #查看主键+--------+--------------+------+-----+---------+-------+| Field | Type | Null | Key | Default |

MySQL database 8 (eight) column properties

Column PropertiesThe column properties are also called field properties, MySQL in a common 6 Properties: NULL , default value, column description, primary key, unique key, and autogrow. Null propertyThe null attribute indicates that the field is

MySQL database 8 (11) Table relationship

Table relationshipsTable relationships: What is the relationship between a table and a table (entity), and how the table structure should be designed for each relationship.OneOne-to-one, a single record in a table has at most one clear relationship

MySQL primary key and index difference and contact

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

Several storage engines in MySQL

Several storage engines commonly used by MySQLMyISAM:(1) do a lot of count calculation;(2) The insertion is not frequent, the query is very frequent;(3) No business.InnoDB:InnoDB Logical Storage structure:The data for all tables is logically stored

MySQL Knowledge points

I. Characteristics of a transactionAtomicity, consistency, isolation, persistenceSecond, the isolation level of the transaction1. Non-submitted reading (read uncommitpeatableted)Infamous dirty read, other transactions uncommitted, still readable to2,

Replication of tables in MySQL

1. GrammarCREATE TABLE table name select: From table name where condition;2. Example1. Copy all records and fields of Moshou.sanguo table, Sanguo2CREATE TABLE Sanguo2SELECT * from Moshou.sanguo;2. Copy the first 3 records of the Moshou.sanguo table,

MySQL database management

创建用户及密码mysql> create user ‘zhao‘@‘loacl‘ identified by ‘123123‘;mysql> use mysql;创建密文密码mysql> select password(‘123123‘); #查看明文对应的密文mysql> create user ‘test01‘@‘localhost‘ identified by #创建密文密码 ‘E56A114692FE0DE073F9A1DD68A00EEB9703F3F1‘;删除用户mysql>

MySQL Master-slave mode

MySQL Master-Slave introduction1, in the master server to the client's instructions to the data operation to the service side of master, the service side will write to the binary log according to the order in which the transactions are submitted.2,

MySQL Rights Management

#授权表user #该表放行的权限 for: All data, all tables under all libraries, and all the fields under the table db #该表放行的权限, for: a database, all tables under that database, and all the fields under the table Tables_priv #该表放行的权限. For: A table, and all fields

Iv. MySQL operation

Operation of JSON dataCREATE TABLE IF not EXISTS Table_json (id BIGINT auto_increment,json json,primary KEY (id)); ALTER TABLE Table_json Add COLUMN name VARCHAR (GENERATED) always as (Json_extract (JSON, "$.name")) virtual; ALTER TABLE Table_json

MySQL Create user and authorization

Rights Management:If you want to create a new user, the following actions are required:1. Go to MySQL Databasemysql> Use mysqldatabase changed2. New User deletion1. Create User: # Specify ip:192.118.1.1 's MJJ User login create username ' mjj ' @ ' 1

MySQL compilation installation

Compiling the installation database (MySQL)First download the MySQL tar package,www.mysql.com DownloadI'm using mysql5.6.41 's tar package.Put the bag in the/usr/local directory.useradd -s /sbin/nologin mysql 创建mysql用户mkdir -p /data/mysql/data

The index in MySQL

an index base1. Definition:In MySQL, the index is also called "Key", which is a data structure used by the storage engine to quickly find records, which can improve query efficiency.The most effective means of optimizing query performance is index

MySQL Learning---Interview basic knowledge point Summary

1, DROP, truncate, delete difference TRUNCATE table is functionally the same as a DELETE statement without a WHERE clause: Both delete all rows in the table. However, TRUNCATE TABLE is faster than DELETE and uses less system and transaction log

Linux+mysql Mixed

First, Linux1, Linux to a file in bulk add a contentFirst vim into the file, then press CTRL + V and then select the number of lines you want, write what you're adding in Shift+i and then press ESCTwo, MySQL1, linux into the MySQL command line

Total Pages: 3233 1 .... 2252 2253 2254 2255 2256 .... 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.