1. Optimize your MySQL query cache
Queries on the MySQL server enable high speed query caching. Keeping the database engine in the background quietly is one of the most effective ways to improve performance. When the same query is executed
Because the records of the database may need to be reordered. In this article, I will talk about improving the order BY statement query efficiency of two ideas for your reference.
In the MySQL database, the ORDER BY statement is used more
MySQL for relational databases (relational database Management System), this so-called "relational" can be understood as the concept of "table", a relational database consists of one or several tables.
A table is the base unit of the DB storage
below to introduce the MySQL database introduction, details as follows:
Mysql
Database:
Oracle, DB2, SQL Server, MySQL, Access, Mangodb, bigtable
relational database
Large
Oracle, DB2
Medium - sized
SQL Server, MySQL
Small
Access
Sql_mode= "", that is, forced not to set MySQL mode (such as no input detection, error prompts, syntax mode check, etc.) should improve performance, but the following problems:
If inappropriate data is inserted (error type or paranormal), MySQL sets
1 loading records in a text file into a MySQL database table(1) Text file format: One record per line, the field values are separated by the tab locator, the field order is the same as the order in the table definition, and the indeterminate field
This article describes the MySQL performance bottleneck to troubleshoot the location of the method. Share to everyone for your reference, specific as follows:
Guide
Speaking from a site, the whole process to resolve how to locate performance
A collection of SQL statements for the ALTER TABLE of MySQL, including adding, modifying, deleting fields, renaming tables, adding, deleting primary keys, and so on.
1: Delete Column
ALTER table "table name" DROP "column name"
2: Adding columns
This article describes the execution of a SELECT query statement in the MySQL database and sorts the results of the query using an ORDER BY clause. Again, review the syntax of the SELECT statement in the SQL statement: The basic syntax for the
I. Overview
Variables are often used in stored procedures, and the use of variables is an important point of knowledge, especially when defining conditions.
MySQL Version: 5.6
Definition and assignment of variables
#创建数据库
DROP DATABASE IF
Today suddenly received an alarm message saying yes/disk space used over the threshold. After viewing, found that there are a lot of abnormal SQL, can not be executed, resulting in processing, resulting in a temporary consumption of/TMP disk space.
MySQL page access statistics and ranking situation
Count the number of pages visited to rank by resolution
SELECT CONCAT (' height ', ' * ', ' width ') as ' resolution ', COUNT (CONCAT (' height ', ' * ', ' width ')) as ' total ' from
'
MySQL sometimes forget the root password is a sad thing, in this case, how to reset the root password it?
Locate and edit the MySQL my.ini configuration file and add skip-grant-table to the Mysqld node. as follows:
# This let you safely
Here is the MySQL Ver 14.14 distrib 5.6.19, for Linux (i686) using Editline Wrapper
A, MySQL directory files
IBDATA1: System table space contains data dictionary, rollback log/undolog, etc.
(Insert buffer segment/double write Segment/rollback
This article illustrates the simple way to backup and restore MySQL in PHP. Share to everyone for your reference, specific as follows:
First, Backup:
Two, restore
0) {echo " failure command as follows:"; For ($ii =1 $ii ". $ii.
MySQL started with the 4.1 version of the concept of character set, so for MySQL4.0 and the following version, their character set is Latin1, so sometimes need to do a bit of MySQL's character set for conversion, MySQL version of the upgrade,
User Authorization method
You can add a new user by issuing a GRANT statement:
shell> mysql--user=root mysql
mysql> GRANT all privileges in *.* to Monty@localhost
identified by ' some Thing ' with GRANT OPTION;
Mysql> GRANT all privileges
Sometimes, you do not want the stored procedure to throw an error abort execution, but rather to return an error code. Mysql supports exception handling by defining Continue/exit exception handling HANDLER to capture Sqlwarning/not
1. Migrating datafor database porting, SQL server=>mysql. The following trigger are available on SQL Server
SET QUOTED_IDENTIFIER on
go
SET ansi_nulls on
go
ALTER TRIGGER [trg_risks] on Dbo.projectrisk
for INSERT, update
as
BEGIN
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