It seems that zdnet's lab has done an authoritative test.Performance of sqlserver in WindowsPerformance of Oracle and MySQL in LinuxComparison (there are other database systems, such as DB2 and Informix)As a result, under 500 concurrent connections,
Functions for escaping special characters in PHP MySQL
One is: mysql_escape_string
One is: addslashes
The difference between mysql_escape_string and addslashes is that
Mysql_escape_string always converts "'" to "\"
And addslashes
Convert "'"
1. View
A view is a virtual table. Unlike tables that contain data, a view only contains queries for dynamically retrieved data during use (that is, including an SQL query). It is only a facility for viewing data stored elsewhere.
Basic View
Turn: http://www.21andy.com/blog/20071102/655.html
Command for backing up MySQL databaseMysqldump-hhostname-uusername-ppassword databasename> backupfile. SQL
Back up the MySQL database in the format of a table with deletionBacking up a MySQL
Check the default link encoding of MySQL on the master and slave servers, especially the slave server. Otherwise, garbled characters may occur during synchronization.
[Mysqld]
Server-id = 2Slave-Skip-errors = allDefault-character-set =
Http://hi.baidu.com/289766516/blog/item/a3f85500556e2c09728da5e1.html
Method 1:Truncate table your table name// This not only deletes all data, but also relocates the auto-increment Field
Method 2:Delete from your table nameDBCC checkident (your
In SQL, we sometimes use in the query statement to query related data. For example:
Select * from goods where goods_id in ('20160301', '64', '20160301', '37', '20160301', '20160301', '20160301 ', '123', '123', '123', '123 ')
In the preceding
Sometimes we need to optimize MySQL. So what improvements should we make to MySQL? A special query? Database mode? Server hardware? The only way is to measure what your system is doing and its performance under various conditions. This is what we
There are two tables, Table
Code highlighting produced by Actipro CodeHighlighter (freeware)http://www.CodeHighlighter.com/-->CREATE TABLE `a` (`id` mediumint(8) unsigned NOT NULL AUTO_INCREMENT,`fid` smallint(6) unsigned NOT NULL DEFAULT '0',`cnt`
In most cases, when the alter table operation is performed, a temporary backup of the target table (temporarily named a) is copied (temporarily named B). The alter operation is performed on the backup file (B) and then delete the target table (a).
I have only recently started working heavilyWith stored procedures and functions in MySQL. After years inOracle world with advanced stored procedures, functions and packages,I 've had to come to grips with the same comings of MySQL. One of thoseIs
The following methods are used to test on my VM. The memory is 384 Mb, the swap partition is 1024 MB, and the test has 3.5 million data records. The requirement is as follows:
Code highlighting produced by Actipro CodeHighlighter
Bigint
Integer Data from-2 ^ 63 (-9223372036854775808) to 2 ^ 63-1 (9223372036854775807) (All numbers ). The storage size is 8 bytes.
P.s.Bigint has a length. The length in the MySQL table is only used to display the digits.
Int
Integer Data from-2 ^
Group_concat function in MySQL
The complete syntax is as follows:
Group_concat ([distinct] field to be connected [order by ASC/DESC sorting field] [separator 'delimiter'])
Basic Querymysql> select * from aa; +------+------+ | id| name | +------+----
Notes for operating MySQL Databases in PHP1. semicolon exceptionsFor MySQL, the first thing you must remember is that every line of its command is ended with a semicolon (;), ...... There is no such thing as absolute. The same is true here. When a
MySQL supports the limit keyword, which allows MySQL to return only a specified record, for example:
Select * From usermsgbox limit 3
This SQL statement allows MySQL to return the first three records in the usermsgbox table, as well:
Select *
MySQL Server Optimization
Recently, I helped people maintain a DZ forum and summarized the following tuning skills to make MySQL servers run fast.
There are three ways to speed up the running of the MySQL server:
1. Replace the faulty hardware.2.
Suddenly, I was a little interested in. net connection to the MySQL database, so I went to the Internet to find information, learn how to install MySQL, and how to use MySQL. I finally got it done!
The final result is to display the data of the data
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