During the execution of transactional statements, the server will perform additional processing. When the server executes multiple transactions in parallel, in order to record them together, the concept of transaction cache needs to be introduced.
When using storm to process logs, we often encounter the efficiency problem of inserting MySQL concurrently. I checked some information online and made some notes.Change the table engine to MyISAM,
Modify the concurrent_insert = 2 of my. CNF. The
Mysql "on duplicate key update" Syntax
If the on duplicate key update is specified at the end of the INSERT statement and the DUPLICATE value appears in a UNIQUE index or primary key after the row is inserted, UPDATE is executed ON the row with the
Copy codeThe Code is as follows: /* ============================ File description ========== ======================================
@ Filename: session. class. php
@ Description: The database saves the online user session to implement the online
1. When creating a MySQL table, the field must be set to a non-empty value and the default value of the field must be set.2. When creating a MySQL table, if the field needs to be NULL, you need to set the default value of the field. The default
In this tutorial, you must modify the related IP addresses in your environment.Update apt-get before use, because the server is basically a bare SystemApt-get update;Apt-get upgrade;1. We use the root account for installation. First switch to the
2 points firstEnabling cache also brings about overhead, mainly in the following aspects:Before starting the query, you must check the cache.If the query is cached but not in the result set, saving the data after the result is generated will incur a
A large amount of data deletion will inevitably lead to discontinuous blank spaces in the data file. when inserting data, these blank spaces will be used.Different storage engines are organized in different ways.MyisamYou can use the following
Run the status command to view the Slow queries item. If the value is greater than 0 for a long time, the query execution time is too long.
Copy codeThe Code is as follows:
Reference content is as follows:Mysql> status;
--------------
Mysql Ver 11.18
First, start the command line.
1. Run:Taskkill/f/im mysqld-nt.exe
The following operations operate some programs in the bin directory of mysql. If no environment variables are configured, switch to the bin directory of mysql and execute the
Profiling is a very useful mysql performance analysis tool. Today, we will test the profiling function. Thanks to the blog post "love Rose:
The SQL Performance Analyzer of mysql is mainly used to display the usage of various resources during SQL
The project needs to re-install a mysql server on the existing server. It is quite difficult, because it was previously tested on my laptop and its system is Ubuntu, what is the path and the startup method. They are all different, so this time I am
In this example, the int char is not given their width, and the system will assign a width to it by default.
M indicates the maximum display width. The maximum valid display width is 255. The display width is irrelevant to the storage size or the
Bad SQL query statements can have a serious impact on the operation of the entire application. They not only consume more database time, but also affect other application components.
Like other disciplines, optimizing query performance is largely
MySQL is so open that you can easily adjust its default settings to achieve better performance and stability. Key variables to be optimized are as follows:
Change the index buffer length (key_buffer)
Generally, this variable controls the buffer
The prompt command displays the current user, database, time, and other information at the mysql prompt.
Copy codeThe Code is as follows: mysql-uroot-p -- prompt = "\ u @ \ h: \ d \ r: \ m: \ s>"
After the setting is successful:Copy codeThe Code is
It is very important to specify the encoding when creating a mysql database. Many developers use the default encoding, which is difficult to prevent. Coding databases can avoid garbled characters caused by import and export.
Webpage data is
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