Performance Counter Analysis
Object
Counter
Analysis
Processor
%processor time
Recommended threshold Value 85%
Memory
Available bytes
The recommended threshold value is less than 4MB to add memory; In addition, it is recommended that you have at least 10% of the physical memory value
Pages reads/sec
Page reads/sec refers to the num
Tags: date orm modify table hint har rom drop number displayNote: The MySQL database command is not case sensitive. But in the Mac terminal, if you want to use the tab auto-Complete command, then you have to use uppercase, so that the Mac terminal will help you complete the command, otherwise you press N times tab will not respond. 1. Database management 1.1. Create Database Create Database Firstdb; 1.2. Show view all databases mysql> show databases;
+--------------------+
| Database
transaction_tbl for testing:CREATE TABLE transaction_tbl (id int (4)) Engine=innodb; INSERT into Transaction_tbl value (1), insert into Transaction_tbl value (2), insert into TRANSACTION_TBL value (3), insert I NTO transaction_tbl Value (4); INSERT into Transaction_tbl value (5);The ability to turn off auto-commit during normal use is enabled by default systemMysql> SHOW GLOBAL VARIABLES like ' autocommit ';+---------------+-------+|variable_name |Value |+---------------+-------+|autocommit | O
Summary of some important MySQL performance indicator calculation and optimization methods, mysql performance indicator
1 QPS calculation (queries per second)
For databases dominated by MyISAM Engines
MySQL> show GLOBAL status like 'questions';+---------------+------------+| Variable_name | Value |+---------------+------------+| Questions | 2009191409 |+---------------+------------+1 row in set (0.00 sec)mysql> show global status like 'uptime';+--
Open terminal and enter the following command:
/usr/local/mysql/bin/mysql-u root-p
Where Root is the user name.
The following command appears:
Enter Password:
At this point, if you do not change the password, directly hit enter. Otherwise, enter your password.This will allow you to access your database server.
1, the operation and management
The base of the data table
Database management
1.1 CREATE Database
Create Database Firstdb;
1.2 Show view all databases
Mysql> Show databases;+---------
Label:Below is a summary of the commonly used MySQL operation statements (Win7) below: 1. Database Management 1.1 CREATE Database Create Database Firstdb; 1.2 Show view all databases mysql> show databases;
+--------------------+
| Database |
+--------------------+
| information_schema |
| Firstdb |
| mysql |
| performance_schema |
+--------------------+
4 rows in Set (0.00 sec) 1.3 alter modifies the database The ALT
disconnects the client.
The set autocommit can modify the way the current connection is submitted, and if set autocommit=0, all the transactions after Setup need to be committed or rolled back by explicit commands.
If we only need transaction control over certain statements, it is convenient to start a transaction using start transaction, so that the transaction can be automatically returned to autocommit after the end, if we want all of our transactions to be not autocommit, It is con
1. Inserting Datainserting a single row of data ( inserts a single row of data if the found statement contains a set keyword)GrammarInsert into table_name setfield 1>= value 1,field 2>= value 2,field 3>= value 3;First look at the table structuremysql> desc T1;+-------+-------------+------+-----+---------+-------+| Field | Type | Null | Key | Default | Extra |+-------+-------------+------+-----+---------+-------+| ID | Int (11) | YES | | NULL | || name | varchar (20) | YES | | NULL | |+-------+--
keyword is the filter for the condition after the categorized result; having and where is the difference: having is a condition filter for the results of the aggregation, Where is the filtering of records prior to aggregation, and if logic allows, it is recommended to use where to filter as much as possible, because the result set is reduced, the efficiency of the aggregation is greatly increased, and then the logical view of whether to re-filter the 6) Table connection: Table joins are di
MySQL performance indicator calculation and Optimization1 QPS computing (queries per second) for databases dominated by the MyISAM Engine
Mysql> show GLOBAL status like 'questions ';+ --------------- + ------------ +| Variable_name | Value |+ --------------- + ------------ +| Questions | 2009191409 |+ --------------- + ------------ +1 row in set (0.00 sec)
Mysql> show global status like 'uptime ';+ --------------- + -------- +| Variable_name | Value |
1-w 448 k-t 600
The server displays the following information:
[4] local 10.10.10.22 port 5001 connected with 10.10.11 port 56251 [ID] Interval Transfer Bandwidth [4] 0.0-1.0 sec 112 MBytes 941 Mbits/sec [4] 1.0-2.0 sec 112 MBytes 941 Mbits/sec [4] 2.0-3.0 sec
Guidance:
Memory: memory usage may be the most important factor in system performance. If the system frequently switches pages, the memory is insufficient. "Page Swap" is a unit called "page". It moves code and data blocks of a fixed size from Ram to a disk to release memory space. Although some page switches enable Windows 2000 to use more memory than actually, they are acceptable, but frequent page exchanges will reduce system performance. Reducing page switching significantly increases the sy
Iperf is a pure bandwidth test software based on the C/S model. It can test the network card throughput.
The advantage of iperf is to simply send and receive packets, to prevent hard disks from dragging down and affecting the test results.
This document uses a gigabit Nic Bcom 5720 as a test environment CentOS 6.4x64
Install iperf on both machinesYuminstalliperf -- enablerepo = epel
Start one of them as a server and open the firewall port 5001.Iperf-s-I 1-w 448 k
The startup result is as fo
index values, 0 for uniqueness, 1 for non-unique
Key_name
The name of the index
Seq_in_index
The serial number in the index starts from 1
column_name
Column Name
Experiment 1: Create an indexed method create a normal index command format ceate index
Prepared a database (student information) inside has created inside (class student information Form)
Mysql> Show databases;+--------------------+| Database |+-
Mysql learning notes: basic operations on tables and mysql learning notes
Create a table
Create table Name
Create table if not exists table name
mysql> create database company;Query OK, 1 row affected (0.00 sec)mysql> use company;Database changedmysql> create table if not exists t_dept( -> deptno int, -> dname varchar(20), -> loc varchar(40));Query OK, 0 rows affected (0.20 sec)mysql> show tables;+------
Is Global active flushed entries is the cache file handle. This handle will be closed after the current transfer is complete. IIS global object.
Number of anonymous connections by web anonymous users/sec users through Web Services.
Number of Blob cache refreshes after IIS global blob Cache Flushes is started on the server.
Total number of successful searches in IIS global blob cache hits blob cache.
Percentage of IIS global blob cache hits % blob cach
MySQL replace into and on duplicate key update test notesMysql> CREATE TABLE tbl_insert_tmp (ID int (5), Addr_number Int (ten), name varchar, primary key (ID), unique key Udx_add R_number (Addr_number));Query OK, 0 rows affected (0.05 sec)Mysql> Show CREATE TABLE Tbl_insert_tmp\g1. Row ***************************Table:tbl_insert_tmpCreate table:create Table ' tbl_insert_tmp ' (' ID ' int (5) Not NULL DEFAULT ' 0 ',' Addr_number ' int (ten) is DEFAULT
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.