Alibabacloud.com offers a wide variety of articles about sql performance tuning techniques, easily find your sql performance tuning techniques information here online.
mysql performance tuning considerations and Indexing One: Optimization of the database1 impact of business needsFor example, posts in the Forum statistics, and real-time updates from a functional command select count ( * from can get results if the forum generates thousands of posts per second, we don't use MyISAM The store uses the innodb storage; Even the best devices are not likely to be
Mysql Tomcat C3p0 System Performance Tuning personal summary
System Information
The application logic is to use c3p0 to query data in the database and return Json data over http.
1. the initial test result JMeter test result before optimization
No.
Type
Original
1000 data bigger
1
500 Connection
250 query/S
63q/S70q/S
2
1000 connections
255q/S
57q/S65 q
As mentioned in parts 1th and 2nd, there are several relatively easy steps to improve performance you can take, one of these steps involves using an automated tool to "guide" you to write SQL statements, there are many production performance analysis or performance tuning to
the number of empty means the cache is used unreasonable (always run out)2.4 MySQL Log type(1) Error log: Log information generated by the database service during startup and operation, enabled by defaultThe Log-error=/var/log/mysqld.log in/ETC/MY.CNF(2) Binlog log: Default is not enabled.(3) query log: Record all executed SQL commands, not enabled by defaultVim/etc/my.cnf[Mysqld]General-log #默认存储位置/var/lib/mysqlDefault name: Host name. log(4) Slow q
Original addressMySQL is a powerful open source relational database management system (RDBMS). It was posted on 1995 (20 ago). It uses Structured Query Language (SQL), which may be the most popular choice in database content management. The latest MySQL version is 5.6.25, released on May 29, 2015.An interesting fact about MySQL is that its name comes from the daughter "My" of Michael Widenius (the founder of MySQL). Although there are many interesting
time should not be set too long, otherwise the meaning is not very good, preferably within 5 seconds, if you need a microsecond level of slow query, Consider a patch for MySQL: Http://www.percona.com/docs/wiki/release:start, remember to find the corresponding version.Turning on the slow query log may have a little impact on system performance, and if your MySQL is a master-slave structure, you can consider opening one of the slow query logs from the
memory disk
Mkdir-p/mnt/ramdisk
sudo mount-t tmpfs-o size=4000m tmpfs/mnt/ramdisk/
mv/var/lib/mysql/mnt/ramdisk/mysql
9. Use MYSQL in a NOSQL way
B-tree is still one of the most efficient indexes, and all MYSQL is still not obsolete.
Using Handlersocket to skip MySQL's SQL parsing layer, MySQL really becomes NOSQL.
10. Other
A single query finally increases LIMIT 1, stopping the full table scan.Separating non-"indexed" data, such
the optimal number of threads" ) b. Increasing the cache C. Where the insert operation is performed frequently, bulk insert with native SQL (persistence layer using Eclipselink)2. Parameter adjustment A.JVM memory parameters B. Database connection pool parameters3. The function realizes the design adjustment (least wants to see)According to the actual situation to adopt appropriate means adjustment.Step ThreeDetect the
Oracle is a high-performance database software. The user can adjust the parameters to achieve the optimization of performance. Performance optimization is mainly divided into two parts:
First, the database administrator through the adjustment of system parameters to achieve the goal of optimization;
The second is that the developer achieves the adjustment by op
the data from disk into the Oracle buffer cache. if this happens too often the performance of the query or the entire database can suffer. typically this is caused by contention for "hot" blocks or objects so it is imperative to find out which data is being contended. once that is known this document lists several alternative methods for solving the issue. conclusion: Two or more sessions simultaneously need to load the objects in the hard disk into
1. Introduction:Javamelody can monitor Java or Java EE application servers in a running environment. It is displayed as a graph: Java memory and Java CPU usage, number of user sessions, JDBC connections, and HTTP requests, SQL requests, JSP pages and Business interface methods (EJB3, Spring, Guice), average execution time, Error percentage, and so on. Charts can be viewed by day, week, month, year, or custom time period.2. Prepare:Download Javamelody-
efficient results.
Http://bbs.linuxtone.org/thread-5152-1-1.html3. Operating System-level optimizationA> A 64-bit system can allocate more memory and service tuning to a single process, disable unnecessary services, modify file descriptor restrictions, and reserve more resources for MySQL;B> File System Optimization: XFS is recommended for a separate file system for the data warehouse, which is generally more efficient and reliable.C> enable the noat
Label:Objective Last three articles we describe how to view query plans, as well as some of the commonly used join operators, Union operators optimization techniques. In this paper, we analyze the parallel operation of SQL Server, as a multi-core computer prevalent today, SQL Server will adjust its own query plan in time to adapt to the expansion of hardware reso
Refer to the book SQL. server.2005. Technical Insider "series
ConclusionThis article first to this bar, the article is short, easy to understand, follow-up on the parallel operation of a part of the content, follow-up articles, this article mainly introduces the parallel operators in the query plan, next we will add some of the SQL Server parallel operations, Then analysis of our daily write addit
GROUP BY:Increase the efficiency of the group BY statement by filtering out unwanted records before group by. The following two queries return the same result but the second one is significantly faster.Copy CodeThe code is as follows:Low efficiency:SELECT JOB, AVG (SAL)From EMP GROUP job has job = ' president ' and AVG (SAL) >xxxEfficient:SELECT JOB, AVG (SAL)From EMPWHERE JOB = ' President 'OR job = ' MANAGER ' GROUP JOB having and AVG (SAL) >xxx7, usually, if the statement can avoid the use o
are very readable6. Use where to replace having (if possible)Optimize GROUP BY:Increase the efficiency of the group BY statement by filtering out unwanted records before group by. The following two queries return the same result but the second one is significantly faster. Copy the code code as follows: Low efficiency:SELECT JOB, AVG (SAL)From EMP GROUP job has job = ' president ' and AVG (SAL) >xxxEfficient:SELECT JOB, AVG (SAL)From EMPWHERE JOB = ' President 'OR job = ' MANAGER ' GROUP JOB hav
: Specify MySQL server 's hostname, default is localhost-P/--port : Specify port to connect to MySQL server, default is 3306-S/--delay : Updated number of seconds, preset is 5 seconds-d/--db/--database : Specify connected repositories, default is test-b/--batch/--batchmode: Specified as batchmode, each update does not clear the old display results, the update data is displayed on the top, the preset is unset-S/--socket : Specifies to use mysqlsocket direct connection without TCP/IP connection,
Label:Original: SQL Server Tuning Series advanced (how the query optimizer runs)ObjectiveIn the previous articles, we introduced a series of basic descriptions of operators and the optimization methods and techniques for each operator. This includes a series of our common operators, including how to view execution plans, how several datasets are commonly used, ho
Tags: explain command performance optimization MySQL database Database tuningIn the previous chapter, we will find out how to discover slow queries and log statements to the logs, so how do you know what the problem of a statement is going to be when you find a slow query. This chapter describes how to use the database profiling commands provided by MySQL to analyze SQL statements. Second, database
, next we will add some of the SQL Server parallel operations, Then analysis of our daily write additions and deletions to these operators to optimize the items, interested in advance attention, about the SQL Server performance tuning of the content is very broad, followed by the analysis in the article.If you have any
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.