When the website runs slowly, I know why it is so slow. So I checked and checked that the database is definitely a very important part, and the SQL statements running in it cannot be ignored. When I work on projects, I also pay attention to the
You can use show and updtime or directly use grep MySQL-related parameters in linux to check the mysql startup time and duration. Let's take a look.
1. uptime can be used to view the system running time
Show global status like 'uptime ';
2. Use
After group by is used, the queried list is sorted by the default asc sequence of the primary key. order by can only be used for the grouped list because the priority of order by is lower than that of group, so how can we solve the grouping Sorting
Myisam and innodb are the most commonly used table storage engines in mysql. We almost don't need or use them any more advanced. For the features of myisam innodb, I 'd like to know a little about it, next I will introduce how to convert innodb
You can use the instr function to determine the position where the mysql search character appears in the field string. This is a bit like the instr function in asp. I hope this tutorial will be helpful to you.
Usage:
INSTR (ori_str, sub_str)
MySQL
Most of us will use the mysqldump command to import and export data in mysql. Today I want to introduce other commands to import and export text file commands, hoping to help you.
MySQL writes data through common insert statements, such Insert into
In SQL, order by has N Different usage methods. Yesterday I talked about an order by with an equal sign. Here we will introduce how order by sorts multiple fields at the same time.
Two fields can be added after order by, which are separated BY
To find out the inefficient SQL statements in mysql, you can use EXPLAIN to analyze the inefficient SQL statements. However, before using EXPLAIN, you need to enable mysql slow query logs to use EXPLAIN, let's take a look.
In the face of rapid
In mysql, we used lock and unlock to lock tables and unlock tables. Today, I am going to give my friends some experience in using lock tables and unlock tables.
Usage of php mysql lock tables
Mysql table lock tables feels like a closed space.
When
This article focuses on the security configuration of Memcache to prevent unauthorized data reading. If you encounter such problems, you can refer to it.
The memcache server directly performs operations after being connected through the client
Recently, it has always been a headache to initialize data for the current project, and the auto-increment of database IDS is getting bigger and bigger, so we need to re-start auto-increment from 1: use the following method:Method 1: If no data is
Today, I learned how to implement the paging effect on the JSP page. In terms of query statements, the top usage is involved. Summary:
To implement top-like functions, we use different SQL statements in SQL Server and MySQL.
1. in SQL Server, we
The encoding is utf8. To import gbk or other encoded data, right-click the navicat database and choose run SQL file. Select the encoding format and import it.
If navicat is not installed, use the following methods:
1. Use a text tool to open the
In mysql, The concat function has a feature that a value of null is returned no matter how much content the second character has. This feature makes us feel inconvenient in the instance application, but we need to use other methods to solve this
In the mysql database, the three functions CONCAT () CONCAT_WS () GROUP_CONCAT () are connection strings, but there are also some differences between them. Let's talk about CONCAT (). Use CONCAT () if one character is null, all successful
Mysql self-join queries some data first Based on the condition and then returns the returned value to query some data. This is mysql self-join. Of course, left join can also be used, next let's take a look at the usage of mysql self-connection.
The
Insert into is used to insert records in mysql. However, to insert multiple records, insert into or other methods are used to traverse and execute insert into. Let's take a look.
Normally, we use SQL to execute
Insert into 'tabale '('name') VALUE (
This article analyzes and introduces the cause and solution of the "Can't create/write to file xxx (Errcode: 13)" error prompt in MySQL.
Recently, I encountered a problem where MySQL could not create temporary files. I learned some knowledge about
We used the create table command to create a table in mysql. The table can be followed by data such as field names and types. For mysql beginners, we recommend using phpmyadmin to create a table, this is a simple method. Let's learn it together.
The
Next I will take a look at the mysql optimization show status to view the MySQL server status information. here we can use show status to view the current running status of the server to optimize the relevant configuration.
During website
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