Use length and char_length two functions
Length: is a calculation of the lengths of a field a Chinese character is counted three characters, a number or letter is counted as a character
Char_length: Whether Chinese characters or numbers or letters
The basic difference:The MyISAM type does not support advanced processing, such as transaction processing, but InnoDB type support. MyISAM type tables emphasize performance, which is performed more than InnoDB types faster, but does not provide
Data replication classification between database tablesWhen using database development, the data between some tables is often imported into each other. Of course, you can write program implementation, but the program often needs to develop the
I got a call from a friend Laopan in my email.
Laopan:Insert into Hudsonresult (Jobid,environmentid,firstsessionid,rerunsessionid,state,desp,otherinfo) values(select ID from Hudson where stream= ' a7510_r52_integration ' and state= ' N ' and
My MySQL is the default UTF8 encoding, the database is also set up UTF8 encoding, the use of the program can add Chinese data, in CMD Use SQL statement new data are reported similar to incorrect string value: ' \xb2\xe2\xca\xd4 ' for Column ' title '
Basic form
Property name RegExp ' Match method '
pattern characters for regular expressions
^ The part that matches the beginning of the character
EG1: Querying records starting with L from the Info table name field
SELECT * from info where
Before the Server Configuration Test service environment, I lazy easy to use the online ready-made script to install, the result of MySQL can not start, so I only honestly reinstall MySQL Server, originally thought Apt-get--purge this kind of
When our website reaches a certain scale, the various optimization of the website must be carried out. And the optimization of the website, for the database optimization is the most important. The following author will share with you the
In the MySQL database, Opened_tables represents the number of open tables, the following is a detailed description of the reasonable configuration of the MySQL open_table.
MySQL Opened_tables represents the number of open tables, and the following
Table_cache is a very important MySQL performance parameter, which is called Table_open_cache in the 5.1.3 version. Table_cache is primarily used to set the number of table caches. Because each client connection accesses at least one table, the
For large web sites such as Facebook,ebay, if there is no memcache as an intermediate cache layer, data access is not possible do, for the general web site, as long as the independent server, can be configured memcache improve the speed of Web site
After installing Mysql-server, you will be prompted to run mysql_secure_installation. Running Mysql_secure_installation will perform several settings:A) set a password for the root user(b) Delete anonymous accountsc) Cancel remote login of root
After querying for inefficient SQL statements, you can obtain information about how MySQL executes the SELECT statement through the EXPLAIN or DESC commands, including the order in which tables are connected and connected during the execution of the
The following four scenarios are analyzed for their pros and cons.
programme I:
Copy Code code as follows:
SELECT * from ' table ' ORDER by RAND () LIMIT 0, 1;
The problem with this approach is that it's very slow. The reason is
This example describes Python's common classes for accessing the MySQL package. Share to everyone for your reference. Specifically as follows:
Python access to MySQL is simpler, the following is a very simple Python access MySQL database class.
I
The newly installed MySQL has two databases: Information_schema and MySQL. What are they for? Can you delete it?
Of course it is not to be deleted.
The
1.information schema is all the dictionary information used by the MySQL system, including
1. First confirm that Python version is 2.3.4 or more, if you don't need to upgrade the Python version
Python-v Check python version
2. Install MySQL, such as installed in the/usr/local/mysql directory
3. Download mysql-python-1.2.2.tar.gzAddress
Here's the code:
First, back up the database and download to the local "db_backup.php"
Copy Code code as follows:
Set up SQL file Save file name
$filename =date ("Y-m-d_h-i-s"). " -". $cfg _dbname.". SQL ";
The file name that
The example in this article describes how PHP saves session sessions using MySQL. Share to everyone for your reference. The specific analysis is as follows:
In many large systems generally have this function, but to separate the analysis, the
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