MySql Performance Tuning (4) Quick table structure modification and mysql Tuning
1. Modify the varchar type
To meet your needs, change varchar (6) To varchar (8). A better method is not to use altertable modify, but to use the following steps:
A. Create A temporary table and set varchar to varchar (8) as follows:
B. Replace the. frm table structure file.
C. Check it.
To be tested in
Database Tuning tutorial (5) Roles of indexes and types of indexes, tuning IndexesIii. Index
In the previous chapter, we learned how to use explain to generate a query execution plan (QEP), so as to discover problems with the statement. Three results returned by explain are related to the index (possible key, key, and extra). It can be seen that the index plays a significant role in improving the query eff
Three Tomcat modes and concurrent tuning, and tomcat Tuning
Three Tomcat modes and concurrent optimization.Three Tomcat running modes are available: BIO, NIO, and APR. These three types are described as follows: 1. bio
The default mode has very low performance and has not been optimized or supported.2. nio
Using java asynchronous io Nursing Technology and noblocking IO technology.
To run in this mode, dir
Linux system tuning authoritative guide, linux tuning Guide
1. Disable SELINUX.1.1 modify the configuration file to make SELINUX disabled permanently effectiveSed's # SELINUX = enforcing # SELINUX = disables # G'/etc/selinux/config ==> restart the system to take effect1.2 temporarily disable SELINUX[Root @ hadoop01 xningge] # setenforceUsage: setenforce [Enforcing | Permissive | 1 | 0]==> The number 0 indic
Need for Performance Tuning
In this world of SAP programming, ABAP is the universal language. in most of the projects, the focus is on getting a team of ABAP programmers as soon as possible, handing over the technical specifications to them and asking them to church n out of the ABAP programs within the "given deadlines ".
Often due to this pressure of schedules and deliveries, the main focus of making a efficient program takes a back seat.
JVM tuning-calculate the active data size and jvm tuning Active Data
Active Data, sometimes called survival data, refers to the size of long-lived objects in the Java heap when the application is in stable running state. In other words, the space occupied by the Java heap after FullGC in the stable running state of the application (memory usage ).
1. Importance of active data computing
The calculation of t
JVM tuning-New Generation and jvm tuning New Generation
A new generation of Java virtual machines, including eden space and two dedicated vor spaces.
The new generation is used to store newly created objects. The new generation features fast object updates and produces a large number of "Dead objects" in a short time ". Garbage collection for young generations is called secondary garbage collection (minor
JVM tuning series: garbage collection and jvm Tuning
Summary: jvm is a required series, which summarizes some common jvm collection mechanisms for easy reference.
Before optimization, we must understand how it runs. java's Garbage Collection is usually called "GC", which was born in The Lisp Language of MIT in 1960, after more than half a century, it has become very mature. Therefore, this article focuses
Jdk1.6 VM tuning practices (1) and jdk1.6vm tuning practices
Linux 2 CPU 16 GB memory, tomcat7
JAVA_OPTS = "-Xmx1024m-Xms1024m-Xss1024K-XX: PermSize = 512 m-XX: MaxPermSize = 1024 m"Cygwin = false
Heap memory:
Xmx, xms is up to 1/4 of the physical memory size, which saves xms and xmx allocation.
Xss, single thread
Permsize: permanent partition size,
Maxpermsize: up to 1/4 of the physical memory size
JVM tuning summary, jvm Tuning
Heap size settingsThe maximum heap size in JVM has three restrictions: the data model (32-BT or 64-bit) of the relevant operating system; the available virtual memory limit of the system; and the available physical memory limit of the system. Generally, 32-bit systems are limited to Gbps ~ 2 GB; 64 indicates that the operating system has unlimited memory. In Windows Server
Chapter 9 JVM tuning recommendations and chapter 9 JVM tuning recommendations
Note: This article mainly references distributed Java applications: basics and practices
1. JVM optimization is mainly about memory optimization, mainly in two aspects:
Size of each generation
Garbage Collector Selection
2. Size of each generation
Common Adjustment Parameters
-Xmx
-Xms
-Xmn
-XX: Invalid vorra
JVM Tuning Tool
Jconsole,jprofile,visualvm
JCONSOLE:JDK, the function is simple, but can be used in a certain load of the system. The garbage collection algorithm is tracked in detail. Detailed description Reference here
Jprofiler: Commercial software, you need to pay. function is powerful. Detailed description Reference here
VISUALVM:JDK, powerful, similar to Jprofiler. Recommended.
How to Tune
Observe memory release, collection class checking,
:37YesOrchid Island Main 15:34:51Oh.Orchid Island Main 15:35:12Other, not quite understand your data in the situation, not very good fine optimization.Orchid Island Main 15:35:44Should still be quick.Snow Leopard 15:36:34GoodSnow Leopard 15:36:36Let me seeOrchid Island Main 15:37:16For example: The index of the other two tablesSnow Leopard 15:37:31WellOrchid Island Main 15:37:43The full table scan, although the table is small, but to 0.5s, should also be a small proportion.Snow Leopard 15:37:55I
inner table size is multiplied by the number of parallel service processes greater than the physical size.3) Pq_distribute (Tab_name, none,broadcast): This combination forces all data rows within the table to be broadcast to each consuming parallel query service process, while the outer data rows are randomly partitioned. This hint is recommended when the inner table is more than the outside hour. An important principle is that the none/broadcase hint is recommended when the inner table size is
Cache Size| Query_cache_type | On | cache type, determines what queries are cached| Query_cache_wlock_invalidate | OFF | when other clients are writing to the MyISAM table If the query cache is returned , the cache result, or wait for the write operation to complete the reread table to get results+------------------------------+---------+Mysql> show global Status Like "qcache%";+-------------------------+-------+| variable_name | Value |+-----------------------
can avoid Key lookup is perfect, let's revise non-clustered index to include it in the index with the Include keyword His fields are:[SQL]
DROP INDEX idx_non_clust_salesorddetaildemo_modifieddate on salesorddetaildemo
GO
CREATE nonclustered INDEX idx_non_clust_salesorddetaildemo_modifieddate on salesorddetaildemo (ModifiedDate)
INCLUDE
(
ProductID,
UnitPrice
)
GO
--Clear the cache, only for the development environment!
DBCC Freeproccache
DBCC dropcleanbuffers
GO
Tags: establishing operations common Invalid database index characters NULL join exist
Establish an appropriate index (refer to "pose for proper database indexing")
Replace or with union (for indexed columns)
Replace in, not exist with exist, not
Do not declare numbers in character format (invalidates the index, resulting in a full table scan)
Do not use SELECT * (List each column after select)
Do not perform calculations in join and WHERE clauses (t
Tuning log switching (tuning log switches)
Log switching: The LGWR process stops writing logs to the current log file, closes the log file, opens a new log file, and writes the data from the log cache to the new log file.
Log switching can either command alter system SWITCH logfile or alter system ARCHIVE log for manual execution, or it can be automatically performed by setting parameters Log_archive_
MySQL is a powerful open-source database. With more and more database-driven applications, people have been pushing MySQL to its limits. Here are 101 tips for adjusting and optimizing MySQL installation. Some of the techniques are specific to the installation environment, but these ideas are generic. I've divided them into several categories to help you master more of the tuning and optimization techniques of MySQL.MySQL server hardware and operating
MySQL is a powerful open-source database. With more and more database-driven applications, people have been pushing MySQL to its limits. Here are 101 tips for adjusting and optimizing MySQL installation. Some of the techniques are specific to the installation environment, but these ideas are generic. I've divided them into several categories to help you master more of the tuning and optimization techniques of MySQL.MySQL server hardware and operating
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.