High performance MySQL 1th, Chapter 2.

Source: Internet
Author: User

First: Chapter One

1: Using Transactions

Transaction ; Select *  from T1; commit;

2: View transaction status

Mysql>Show variables like 'autocommit';+---------------+-------+|Variable_name|Value|+---------------+-------+|Autocommit|  on    |+---------------+-------+1Rowinch Set

In MySQL, transactions are committed by default, which means that each query is executed separately as a transaction. If you want to turn off automatic commit of transactions, you can use set autocommit=0; or set Autocommit=off;

3: Sets the isolation level of the transaction. For example, set the transaction isolation level to read-write commits:

Set Transaction Isolation  Level Read committed;

The 4:mysql storage engine can use Show table status if the storage engine that queries all tables is available; If you query the storage engine of the user table, you can use the following statement

Mysql>ShowTableStatus like 'User';+------+--------+---------+------------+------+----------------+-------------+-----------------+-------------- +-----------+----------------+---------------------+---------------------+------------+-----------------+------ ----+----------------+---------+|Name|Engine|Version|Row_format|Rows|Avg_row_length|Data_length|Max_data_length|Index_length|Data_free|Auto_increment|Create_time|Update_time|Check_time|Collation|Checksum|Create_options|Comment|+------+--------+---------+------------+------+----------------+-------------+-----------------+-------------- +-----------+----------------+---------------------+---------------------+------------+-----------------+------ ----+----------------+---------+| User |MyISAM|      Ten |Dynamic|    0 |              0 |           0 | 281474976710655 |         4096 |         0 |              1 | 2018- -- -  -: -: Geneva | 2018- -- -  -: -: Geneva | NULL       |Utf8_general_ci| NULL     |                |         |+------+--------+---------+------------+------+----------------+-------------+-----------------+------------- -+-----------+----------------+---------------------+---------------------+------------+-----------------+----- -----+----------------+---------+1Rowinch Set

Changing the table's storage engine

MySQL>altertable test engine=0 rows affected

5: If you want to copy a table, you can use

MySQL>createtable like test;

II: Chapter II, testing

Test HTTP downloads with Http_load

TXT file

http://www.baidu.com/https://map.baidu.com/https:// www.cnblogs.com/zhyunfe/p/6209074. html

Sql

- 1 - ten Test.txt;

High performance MySQL 1th, Chapter 2.

Related Article

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.