SlideShare una empresa de Scribd logo
1 de 34
Descargar para leer sin conexión
OSS Cube|OSI Days 2010
                                                                1
                                                                1




MySQL Performance Tuning: Top 10
Tips



               Presented by :-
                  Sonali Minocha
                  Osscube, New Delhi
OSS Cube|OSI Days 2010
                                                                                                             2
                                                                                                             2




                           Why Tune a Database?
Cost-effectiveness
o A system that is tuned can minimize the need to buy additional hardware and other
resources to meet the needs of the end users.
o Tuning may demonstrate that the system being used is excessive for the end users and
downsizing is the better option. This may result in multiple levels of savings to include
maintenance.
· Performance

o A high-performance, well-tuned system produces faster response time and better
throughput within the organization. This increases the productivity of the end users.
o A well-tuned system benefits the organization’s customers, poor response time causes lot
of unhappiness and loses business.
· Competitive Advantage
o Tuning a system for optimal performance gives the end users the ability to glean more
critical information faster than the competitors thus giving the company as a whole an
advantage.
o Tuning the access to the data helps business analysts, who are utilizing business
intelligence initiatives based on corporate data, make faster and more precise decisions.
OSS Cube|OSI Days 2010
                                                                         3
                                                                         3




                                        Who Tunes?
•   All persons involved with the MySQL software should be
    concerned with performance and involved in tuning.
    Consider all phases of the System Development Life Cycle
    (SDLC) as opportunities to create and enhance an
    effective, well designed and efficient system.
•   · Application Designers
•   · Application Developers
•   · Database Administrators
•   · System Administrators
OSS Cube|OSI Days 2010
                                                                          4
                                                                          4



                                  What is Tuned?

Careful design of systems and applications is essential to the
   optimal performance of any database. In most cases the
   greatest gain in performance can be achieved through
   tuning the application. The most opportune time to consider
   performance issues is when the application is in the very
   early stages of the SDLC.
• · Application Design
• · Application Development
• · Database Structures
• · Hardware
OSS Cube|OSI Days 2010
                                                                                                                                     5
                                                                                                                                     5



When should Tuning be accomplished?
 •   · From the beginning
 •   · Routine tune-ups
 •   · Response to problems/bottlenecks
 •   · Proactive Tuning
 •   · End-of-life
 •   o Bottom line, performance tuning is never finished. As long as the database system is in
 •   place, the DBA will continually be adjusting the database architecture to meet the
 •   continual needs of the end user.


 •   Tuning Outcome
 •   The effect of tuning should be readily apparent to the end user. For this reason, the tuning outcome
 •   should be to:
 •   · Minimize or decrease the response time
 •   · Provide high throughput scalability at comparable response times


 •   Tuning Targets
 •   Tuning goals can be defined in numerous ways. In many cases the goals are set by the users of the
 •   system in order for them to perform their daily functions efficiently.
 •   · How much data needs to be processed?
 •   · How quickly can the information be returned to the user?
 •   · What is the total number of users that can efficiently access the data?
OSS Cube|OSI Days 2010
                                                                                                  6
                                                                                                  6



                How much tuning is enough?
•   Too Little Tuning

•   Too Much Tuning

•   Other Questions to Consider
•   · Is the cost of improving the database architecture or adding additional resources cost
    effective for the return on investment that the data is providing to the organization?

•   · Are changes made to database systems that are in production?

•   · Is the integrity of the data being compromised for speed?

•   There comes a point when the system is in balance, and it is better not to adjust settings
    to achieve infinitesimally small performance improvements.

•   Caution is required when making changes once a system is in production. For best
    results, always try to build a test environment
OSS Cube|OSI Days 2010
                                                                  7
                                                                  7



                             Stages of Tuning

•   Application design
•   Application development
•   Database configuration
•   Application maintenance and growth
•   Troubleshooting
OSS Cube|OSI Days 2010
                                                           8
                                                           8



                     Measurement Methods

•   Benchmarking
•   Profiling
•   Benchmarking Vs Profiling
OSS Cube|OSI Days 2010
                                              9
                                              9




Application Development
  (Optimizing Queries)
OSS Cube|OSI Days 2010
                                                                               10
                                                                               10




                                                     Indexes
•   In MySQL there are several types of indexes:
    – Tree Indexes
       •   B-Trees
            – FULLTEXT indexes (based on words instead of whole
               columns)
       •   B+Trees (InnoDB)
       •   T-Trees (NDB)
       •   Red-black binary trees (MEMORY)
       •   R-Trees (MyISAM, spatial indexes)
    – Hash indexes (MEMORY and NDB)
•   The use of indexes to find rows speedes up most queries
•   Writes become slower with each added index
OSS Cube|OSI Days 2010
                                                                                   11
                                                                                   11



                           Query Execution Plan
                                   (EXPLAIN)
•   With EXPLAIN the query is sent all the way to the optimizer,
    but not to the storage engine
•   Instead EXPLAIN returns the query execution plan
•   EXPLAIN tells you:
    –   In which order the tables are read
    –   What types of read operations that are made
    –   Which indexes could have been used
    –   Which indexes are used
    –   How the tables refer to each other
    –   How many rows the optimizer estimates to retrieve from each table
OSS Cube|OSI Days 2010
                                                                                         12
                                                                                         12




                                      EXPLAIN Types
system            The table has only one row
const             At the most one matching row, treated as a constant
eq_ref            One row per row from previous tables
ref               Several rows with matching index value
ref_or_null       Like ref, plus NULL values
index_merge       Several index searches are merged
unique_subquery   Same as ref for some subqueries
index_subquery    As above for non-unique indexes
range             A range index scan
index             The whole index is scanned
ALL               A full table scan
OSS Cube|OSI Days 2010
                                                                                                  13
                                                                                                  13




                                            EXPLAIN Extra
Using index              The result is created straight from the index
Using where              Not all rows are used in the result

Distinct                 Only a single row is read per row combination
Not exists               A LEFT JOIN missing rows optimization is used
Using filesort           An extra row sorting step is done
Using temporary          A temporary table is used

Range checked for each   The read type is optimized individually for each combination of rows
record                   from the previous tables
OSS Cube|OSI Days 2010
                                                                                      14
                                                                                      14




                                   Optimizer Hints
STRAIGHT_JOIN        Forces the optimizer to join the tables in the given order
SQL_BIG_RESULTS      Together with GROUP BY or DISTINCT tells the server to
                     use disk-based temp tables
SQL_BUFFER_RESULTS   Tells the server to use a temp table, thus releasing locks
                     early (for table-locks)
USE INDEX            Hints to the optimizer to use the given index
FORCE INDEX          Forces the optimizer to use the index (if possible)
IGNORE INDEX         Forces the optimizer not the use the index
OSS Cube|OSI Days 2010
                                                                            15
                                                                            15




        Selecting Queries to Optimize
•   The slow query log
    – Logs all queries that take longer than long_query_time
    – Can also log all queries that don’t use indexes with
      --log-queries-not-using-indexes
    – To log slow administrative commands use
      --log-slow-admin-statements
    – To analyze the contents of the slow log use mysqldumpslow
•   The general query log can be use to analyze:
    – Reads vs. writes
    – Simple queries vs. complex queries
    – etc
OSS Cube|OSI Days 2010
                                                16
                                                16




 Database Designing
(Optimizing Schemas)
OSS Cube|OSI Days 2010
                                                                            17
                                                                            17




                                     Normalization
•   Normalization is a key factor in optimizing your database
    structure
    – Good normalization prevents redundant data from being
      stored in the same tables
    – By moving redundant data to their own table, this reduces
      storage requirements and overhead when processing queries
    – Transactional databases should be in the 3rd normal form
•   For data warehousing and reporting system a star-schema
    might be a better solution
OSS Cube|OSI Days 2010
                                                                          18
                                                                          18




                          Table Optimizations
•   Use columns that are as short as possible;
    – INT instead of BIGINT
    – VARCHAR(10) instead of VARCHAR(255)
    – etc.
•   Pay special attention to columns that are used in joins
•   Define columns as NOT NULL if possible
•   For hints on saving space, use PROCEDURE ANALYSE()
•   For data warehousing or reporting systems consider using
    summary tables for speed
OSS Cube|OSI Days 2010
                                                                               19
                                                                               19




                           Index Optimizations
•   An index on the whole column is not always necessary
    – Instead index just a prefix of a column
    – Prefix indexes take less space and the operations are faster
•   Composite indexes can be used for searches on the first
    column(s) in the index
•   Minimize the size of PRIMARY KEYs that are used as
    references in other tables
    – Using an auto_increment column can be more optimal
•   A FULLTEXT index is useful for
    – word searches in text
    – searches on several columns
OSS Cube|OSI Days 2010
                                                                              20
                                                                              20




    MyISAM-Specific Optimizations
•   Consider which row format to use, dynamic, static or
    compressed
    – Speed vs. space
•   Consider splitting large tables into static and dynamic parts
•   Important to perform table maintenance operations regularly
    or after big DELETE/UPDATE operations
    – Especially on tables with dynamic row format
•   Change the row-pointer size (default 6b) for large (>256Tb)
    tables or smaller (< 4Gb) tables
OSS Cube|OSI Days 2010
                                                                            21
                                                                            21




     InnoDB-Specific Optimizations
•   InnoDB uses clustered indexes
    – The length of the PRIMARY KEY is extremely important
•   The rows are always dynamic
    – Using VARCHAR instead of CHAR is almost always better
•   Maintenance operations needed after
    – Many UPDATE/DELETE operations
       •   The pages can become underfilled
OSS Cube|OSI Days 2010
                                                                           22
                                                                           22



                           MEMORY-Specific
                              Optimizations
•   Use BTREE (Red-black binary trees) indexes
    – When key duplication is high
    – When you need range searches
•   Set a size limit for your memory tables
    – With --max_heap_table_size
•   Remove unused memory
    – TRUNCATE TABLE to completely remove the contents of the
      table
    – A null ALTER TABLE to free up deleted rows
OSS Cube|OSI Days 2010
                                                 23
                                                 23




Optimizing the Server
OSS Cube|OSI Days 2010
                                                                                 24
                                                                                 24




                     Performance Monitoring
•   Server performance can be tracked using native OS tools
    – vmstat, iostat, mpstat on Unix
    – performance counters on Windows
•   The mysqld server tracks crucial performance counters
    – SHOW STATUS gives you a snapshot
    – Can use Cricket, SNMP, custom scripts to graph over time
    – MySQL Administrator
        •   Default graphs
        •   Allows you to create your own graphs
•   Queries can be tracked using log files
    – Can collect every query submitted to the server
    – Slow queries can be logged easily
OSS Cube|OSI Days 2010
                                                                            25
                                                                            25




      Monitoring Threads in MySQL
•   To get a snapshot of all threads in MySQL
    – SHOW FULL PROCESSLIST
    – The state column shows what’s going on for each query
•   Performance problems can often be detected by
    – Monitoring the processlist
    – Verifying status variables
•   Imminent problems can be eliminated by
    – Terminating runaway or unnecessary threads with KILL
OSS Cube|OSI Days 2010
                                                                                       26
                                                                                       26




               Tuning MySQL Parameters
•   Some MySQL options can be changed online
•   The dynamic options are either
    – SESSION specific
        •   Changing the value will only affect the current connection
    – GLOBAL
        •   Changing the value will affect the whole server
    – Both
        •   When changing the value SESSION/GLOBAL should be specified
•   Online changes are not persistant over a server restart
    – The configuration files have to be changed as well
•   The current values of all options can be found with
    SHOW SESSION/GLOBAL VARIABLES
OSS Cube|OSI Days 2010
                                                                                        27
                                                                                        27




                                         Status Variables
•   MySQL collects lots of status indicators
    – These can be monitored with SHOW STATUS
•   The variables provide a way of monitoring the server
    activity
•   They also act as guides when optimizing the server
•   The variables can also be viewed with
    – mysqladmin extended-status
    – MySQL Administrator
        •   Provides graphical interface for monitoring the variables
        •   Can be very efficient for tracking the health of the server
OSS Cube|OSI Days 2010
                                                                                  28
                                                                                  28




                         Some Global Options
•   table_cache (default 64)
    – Cache for storing open table handlers
    – Increase this if Opened_tables is high
•   thread_cache (default 0)
    – Number of threads to keep for reuse
    – Increase if threads_created is high
    – Not useful if the client uses connection pooling
•   max_connections (default 100)
    – The maximum allowed number of simultaneous connections
    – Very important for tuning thread specific memory areas
    – Each connection uses at least thread_stack of memory
OSS Cube|OSI Days 2010
                                                                          29
                                                                          29




                MyISAM Global Options
•   key_buffer_size (default 8Mb)
    – Cache for storing indices
    – Increase this to get better index handling
    – Miss ratio (key_reads/key_read_requests) should be
      very low, at least < 0.03 (often < 0.01 is desirable)
•   Row caching is handled by the OS
OSS Cube|OSI Days 2010
                                                                                  30
                                                                                  30



                MyISAM Thread-Specific
                              Options
•   myisam_sort_buffer_size (default 8Mb)
    – Used when sorting indexes during REPAIR/ALTER TABLE
•   myisam_repair_threads (default 1)
    – Used for bulk import and repairing
    – Allows for repairing indexes in multiple threads
•   myisam_max_sort_file_size
    – The max size of the file used while re-creating indexes
OSS Cube|OSI Days 2010
                                                                              31
                                                                              31


       InnoDB-Specific Optimization
                                1/2
•   innodb_buffer_pool_size (default 8Mb)
    – The memory buffer InnoDB uses to cache both data and
      indexes
    – The bigger you set this the less disk i/o is needed
    – Can be set very high (up to 80% on a dedicated system)
•   innodb_flush_log_at_trx_commit (default 1)
    – 0 writes and sync’s once per second (not ACID)
    – 1 forces sync to disk after every commit
    – 2 write to disk every commit but only sync’s about once per
      second
OSS Cube|OSI Days 2010
                                                                                32
                                                                                32



       InnoDB-Specific Optimization
                                2/2
•   innodb_log_buffer_size (default 1Mb)
    – Larger values allows for larger transactions to be logged in
      memory
    – Sensible values range from 1M to 8M
•   innodb_log_file_size (default 5Mb)
    – Size of each InnoDB redo log file
    – Can be set up to buffer_pool_size
OSS Cube|OSI Days 2010
                               33
                               33




Q&A
OSS Cube|OSI Days 2010
                                     34
                                     34




Thank you

Más contenido relacionado

La actualidad más candente

MariaDB Performance Tuning and Optimization
MariaDB Performance Tuning and OptimizationMariaDB Performance Tuning and Optimization
MariaDB Performance Tuning and OptimizationMariaDB plc
 
MySQL8.0_performance_schema.pptx
MySQL8.0_performance_schema.pptxMySQL8.0_performance_schema.pptx
MySQL8.0_performance_schema.pptxNeoClova
 
MySQL Performance Tuning. Part 1: MySQL Configuration (includes MySQL 5.7)
MySQL Performance Tuning. Part 1: MySQL Configuration (includes MySQL 5.7)MySQL Performance Tuning. Part 1: MySQL Configuration (includes MySQL 5.7)
MySQL Performance Tuning. Part 1: MySQL Configuration (includes MySQL 5.7)Aurimas Mikalauskas
 
Streaming Operational Data with MariaDB MaxScale
Streaming Operational Data with MariaDB MaxScaleStreaming Operational Data with MariaDB MaxScale
Streaming Operational Data with MariaDB MaxScaleMariaDB plc
 
Maria db 이중화구성_고민하기
Maria db 이중화구성_고민하기Maria db 이중화구성_고민하기
Maria db 이중화구성_고민하기NeoClova
 
Physical architecture of sql server
Physical architecture of sql serverPhysical architecture of sql server
Physical architecture of sql serverDivya Sharma
 
MySQL Advanced Administrator 2021 - 네오클로바
MySQL Advanced Administrator 2021 - 네오클로바MySQL Advanced Administrator 2021 - 네오클로바
MySQL Advanced Administrator 2021 - 네오클로바NeoClova
 
MySQL Administrator 2021 - 네오클로바
MySQL Administrator 2021 - 네오클로바MySQL Administrator 2021 - 네오클로바
MySQL Administrator 2021 - 네오클로바NeoClova
 
My sql failover test using orchestrator
My sql failover test  using orchestratorMy sql failover test  using orchestrator
My sql failover test using orchestratorYoungHeon (Roy) Kim
 
Optimizing queries MySQL
Optimizing queries MySQLOptimizing queries MySQL
Optimizing queries MySQLGeorgi Sotirov
 
The MySQL Query Optimizer Explained Through Optimizer Trace
The MySQL Query Optimizer Explained Through Optimizer TraceThe MySQL Query Optimizer Explained Through Optimizer Trace
The MySQL Query Optimizer Explained Through Optimizer Traceoysteing
 
Deep Dive into the New Features of Apache Spark 3.0
Deep Dive into the New Features of Apache Spark 3.0Deep Dive into the New Features of Apache Spark 3.0
Deep Dive into the New Features of Apache Spark 3.0Databricks
 
Linux and H/W optimizations for MySQL
Linux and H/W optimizations for MySQLLinux and H/W optimizations for MySQL
Linux and H/W optimizations for MySQLYoshinori Matsunobu
 
Advanced MySQL Query Tuning
Advanced MySQL Query TuningAdvanced MySQL Query Tuning
Advanced MySQL Query TuningAlexander Rubin
 
Mastering PostgreSQL Administration
Mastering PostgreSQL AdministrationMastering PostgreSQL Administration
Mastering PostgreSQL AdministrationEDB
 
MySQL_SQL_Tunning_v0.1.3.docx
MySQL_SQL_Tunning_v0.1.3.docxMySQL_SQL_Tunning_v0.1.3.docx
MySQL_SQL_Tunning_v0.1.3.docxNeoClova
 
MySQL Storage Engines
MySQL Storage EnginesMySQL Storage Engines
MySQL Storage EnginesKarthik .P.R
 
Log analysis with the elk stack
Log analysis with the elk stackLog analysis with the elk stack
Log analysis with the elk stackVikrant Chauhan
 
MySQL_MariaDB로의_전환_기술요소-202212.pptx
MySQL_MariaDB로의_전환_기술요소-202212.pptxMySQL_MariaDB로의_전환_기술요소-202212.pptx
MySQL_MariaDB로의_전환_기술요소-202212.pptxNeoClova
 
Query Optimization with MySQL 5.7 and MariaDB 10: Even newer tricks
Query Optimization with MySQL 5.7 and MariaDB 10: Even newer tricksQuery Optimization with MySQL 5.7 and MariaDB 10: Even newer tricks
Query Optimization with MySQL 5.7 and MariaDB 10: Even newer tricksJaime Crespo
 

La actualidad más candente (20)

MariaDB Performance Tuning and Optimization
MariaDB Performance Tuning and OptimizationMariaDB Performance Tuning and Optimization
MariaDB Performance Tuning and Optimization
 
MySQL8.0_performance_schema.pptx
MySQL8.0_performance_schema.pptxMySQL8.0_performance_schema.pptx
MySQL8.0_performance_schema.pptx
 
MySQL Performance Tuning. Part 1: MySQL Configuration (includes MySQL 5.7)
MySQL Performance Tuning. Part 1: MySQL Configuration (includes MySQL 5.7)MySQL Performance Tuning. Part 1: MySQL Configuration (includes MySQL 5.7)
MySQL Performance Tuning. Part 1: MySQL Configuration (includes MySQL 5.7)
 
Streaming Operational Data with MariaDB MaxScale
Streaming Operational Data with MariaDB MaxScaleStreaming Operational Data with MariaDB MaxScale
Streaming Operational Data with MariaDB MaxScale
 
Maria db 이중화구성_고민하기
Maria db 이중화구성_고민하기Maria db 이중화구성_고민하기
Maria db 이중화구성_고민하기
 
Physical architecture of sql server
Physical architecture of sql serverPhysical architecture of sql server
Physical architecture of sql server
 
MySQL Advanced Administrator 2021 - 네오클로바
MySQL Advanced Administrator 2021 - 네오클로바MySQL Advanced Administrator 2021 - 네오클로바
MySQL Advanced Administrator 2021 - 네오클로바
 
MySQL Administrator 2021 - 네오클로바
MySQL Administrator 2021 - 네오클로바MySQL Administrator 2021 - 네오클로바
MySQL Administrator 2021 - 네오클로바
 
My sql failover test using orchestrator
My sql failover test  using orchestratorMy sql failover test  using orchestrator
My sql failover test using orchestrator
 
Optimizing queries MySQL
Optimizing queries MySQLOptimizing queries MySQL
Optimizing queries MySQL
 
The MySQL Query Optimizer Explained Through Optimizer Trace
The MySQL Query Optimizer Explained Through Optimizer TraceThe MySQL Query Optimizer Explained Through Optimizer Trace
The MySQL Query Optimizer Explained Through Optimizer Trace
 
Deep Dive into the New Features of Apache Spark 3.0
Deep Dive into the New Features of Apache Spark 3.0Deep Dive into the New Features of Apache Spark 3.0
Deep Dive into the New Features of Apache Spark 3.0
 
Linux and H/W optimizations for MySQL
Linux and H/W optimizations for MySQLLinux and H/W optimizations for MySQL
Linux and H/W optimizations for MySQL
 
Advanced MySQL Query Tuning
Advanced MySQL Query TuningAdvanced MySQL Query Tuning
Advanced MySQL Query Tuning
 
Mastering PostgreSQL Administration
Mastering PostgreSQL AdministrationMastering PostgreSQL Administration
Mastering PostgreSQL Administration
 
MySQL_SQL_Tunning_v0.1.3.docx
MySQL_SQL_Tunning_v0.1.3.docxMySQL_SQL_Tunning_v0.1.3.docx
MySQL_SQL_Tunning_v0.1.3.docx
 
MySQL Storage Engines
MySQL Storage EnginesMySQL Storage Engines
MySQL Storage Engines
 
Log analysis with the elk stack
Log analysis with the elk stackLog analysis with the elk stack
Log analysis with the elk stack
 
MySQL_MariaDB로의_전환_기술요소-202212.pptx
MySQL_MariaDB로의_전환_기술요소-202212.pptxMySQL_MariaDB로의_전환_기술요소-202212.pptx
MySQL_MariaDB로의_전환_기술요소-202212.pptx
 
Query Optimization with MySQL 5.7 and MariaDB 10: Even newer tricks
Query Optimization with MySQL 5.7 and MariaDB 10: Even newer tricksQuery Optimization with MySQL 5.7 and MariaDB 10: Even newer tricks
Query Optimization with MySQL 5.7 and MariaDB 10: Even newer tricks
 

Destacado

MySQL Performance Tips & Best Practices
MySQL Performance Tips & Best PracticesMySQL Performance Tips & Best Practices
MySQL Performance Tips & Best PracticesIsaac Mosquera
 
Mysql Explain Explained
Mysql Explain ExplainedMysql Explain Explained
Mysql Explain ExplainedJeremy Coates
 
More mastering the art of indexing
More mastering the art of indexingMore mastering the art of indexing
More mastering the art of indexingYoshinori Matsunobu
 
Join-fu: The Art of SQL Tuning for MySQL
Join-fu: The Art of SQL Tuning for MySQLJoin-fu: The Art of SQL Tuning for MySQL
Join-fu: The Art of SQL Tuning for MySQLZendCon
 
Webinar 2013 advanced_query_tuning
Webinar 2013 advanced_query_tuningWebinar 2013 advanced_query_tuning
Webinar 2013 advanced_query_tuning晓 周
 
MySQL Webinar 2/4 Performance tuning, hardware, optimisation
MySQL Webinar 2/4 Performance tuning, hardware, optimisationMySQL Webinar 2/4 Performance tuning, hardware, optimisation
MySQL Webinar 2/4 Performance tuning, hardware, optimisationMark Swarbrick
 
Performance Tuning Best Practices
Performance Tuning Best PracticesPerformance Tuning Best Practices
Performance Tuning Best Practiceswebhostingguy
 
浅析My sql事务隔离级别与锁 seanlook
浅析My sql事务隔离级别与锁 seanlook浅析My sql事务隔离级别与锁 seanlook
浅析My sql事务隔离级别与锁 seanlook晓 周
 
MySQL EXPLAIN Explained-Norvald H. Ryeng
MySQL EXPLAIN Explained-Norvald H. RyengMySQL EXPLAIN Explained-Norvald H. Ryeng
MySQL EXPLAIN Explained-Norvald H. Ryeng郁萍 王
 
Optimizing MySQL Queries
Optimizing MySQL QueriesOptimizing MySQL Queries
Optimizing MySQL QueriesAchievers Tech
 
Mysql performance tuning
Mysql performance tuningMysql performance tuning
Mysql performance tuningPhilip Zhong
 
Performance Schema для отладки MySQL приложений
Performance Schema для отладки MySQL приложенийPerformance Schema для отладки MySQL приложений
Performance Schema для отладки MySQL приложенийSveta Smirnova
 
Before you optimize: Understanding Execution Plans
Before you optimize: Understanding Execution PlansBefore you optimize: Understanding Execution Plans
Before you optimize: Understanding Execution PlansTimothy Corey
 
Strategies for SQL Server Index Analysis
Strategies for SQL Server Index AnalysisStrategies for SQL Server Index Analysis
Strategies for SQL Server Index AnalysisJason Strate
 

Destacado (20)

MySQL Performance Tips & Best Practices
MySQL Performance Tips & Best PracticesMySQL Performance Tips & Best Practices
MySQL Performance Tips & Best Practices
 
How to Design Indexes, Really
How to Design Indexes, ReallyHow to Design Indexes, Really
How to Design Indexes, Really
 
Mysql Explain Explained
Mysql Explain ExplainedMysql Explain Explained
Mysql Explain Explained
 
Explain that explain
Explain that explainExplain that explain
Explain that explain
 
More mastering the art of indexing
More mastering the art of indexingMore mastering the art of indexing
More mastering the art of indexing
 
Join-fu: The Art of SQL Tuning for MySQL
Join-fu: The Art of SQL Tuning for MySQLJoin-fu: The Art of SQL Tuning for MySQL
Join-fu: The Art of SQL Tuning for MySQL
 
Webinar 2013 advanced_query_tuning
Webinar 2013 advanced_query_tuningWebinar 2013 advanced_query_tuning
Webinar 2013 advanced_query_tuning
 
MySQL Webinar 2/4 Performance tuning, hardware, optimisation
MySQL Webinar 2/4 Performance tuning, hardware, optimisationMySQL Webinar 2/4 Performance tuning, hardware, optimisation
MySQL Webinar 2/4 Performance tuning, hardware, optimisation
 
Performance Tuning Best Practices
Performance Tuning Best PracticesPerformance Tuning Best Practices
Performance Tuning Best Practices
 
Performance Tuning
Performance TuningPerformance Tuning
Performance Tuning
 
浅析My sql事务隔离级别与锁 seanlook
浅析My sql事务隔离级别与锁 seanlook浅析My sql事务隔离级别与锁 seanlook
浅析My sql事务隔离级别与锁 seanlook
 
MySQL EXPLAIN Explained-Norvald H. Ryeng
MySQL EXPLAIN Explained-Norvald H. RyengMySQL EXPLAIN Explained-Norvald H. Ryeng
MySQL EXPLAIN Explained-Norvald H. Ryeng
 
Optimizing MySQL Queries
Optimizing MySQL QueriesOptimizing MySQL Queries
Optimizing MySQL Queries
 
Mysql performance tuning
Mysql performance tuningMysql performance tuning
Mysql performance tuning
 
Performance Schema для отладки MySQL приложений
Performance Schema для отладки MySQL приложенийPerformance Schema для отладки MySQL приложений
Performance Schema для отладки MySQL приложений
 
Mysql Optimization
Mysql OptimizationMysql Optimization
Mysql Optimization
 
MySQL on AWS 101
MySQL on AWS 101MySQL on AWS 101
MySQL on AWS 101
 
Index in sql server
Index in sql serverIndex in sql server
Index in sql server
 
Before you optimize: Understanding Execution Plans
Before you optimize: Understanding Execution PlansBefore you optimize: Understanding Execution Plans
Before you optimize: Understanding Execution Plans
 
Strategies for SQL Server Index Analysis
Strategies for SQL Server Index AnalysisStrategies for SQL Server Index Analysis
Strategies for SQL Server Index Analysis
 

Similar a MySQL Performance Tuning: Top 10 Tips

Is OLAP Dead?: Can Next Gen Tools Take Over?
Is OLAP Dead?: Can Next Gen Tools Take Over?Is OLAP Dead?: Can Next Gen Tools Take Over?
Is OLAP Dead?: Can Next Gen Tools Take Over?Senturus
 
Kognitio feb 2013
Kognitio feb 2013Kognitio feb 2013
Kognitio feb 2013Kognitio
 
Kognitio overview april 2013
Kognitio overview april 2013Kognitio overview april 2013
Kognitio overview april 2013Kognitio
 
Toad for Sybase Datasheet
Toad for Sybase DatasheetToad for Sybase Datasheet
Toad for Sybase DatasheetToad4Sybase
 
2013 CPM Conference, Nov 6th, NoSQL Capacity Planning
2013 CPM Conference, Nov 6th, NoSQL Capacity Planning2013 CPM Conference, Nov 6th, NoSQL Capacity Planning
2013 CPM Conference, Nov 6th, NoSQL Capacity Planningasya999
 
CICS TS for z/OS, From Waterfall to Agile using Rational Jazz Technology - no...
CICS TS for z/OS, From Waterfall to Agile using Rational Jazz Technology - no...CICS TS for z/OS, From Waterfall to Agile using Rational Jazz Technology - no...
CICS TS for z/OS, From Waterfall to Agile using Rational Jazz Technology - no...IBM Danmark
 
Adf and ala design c sharp corner toronto chapter feb 2019 meetup nik shahriar
Adf and ala design c sharp corner toronto chapter feb 2019 meetup nik shahriarAdf and ala design c sharp corner toronto chapter feb 2019 meetup nik shahriar
Adf and ala design c sharp corner toronto chapter feb 2019 meetup nik shahriarNilesh Shah
 
Collaborate 2018: Optimizing Your Robust Oracle EBS Footprint for Radical Eff...
Collaborate 2018: Optimizing Your Robust Oracle EBS Footprint for Radical Eff...Collaborate 2018: Optimizing Your Robust Oracle EBS Footprint for Radical Eff...
Collaborate 2018: Optimizing Your Robust Oracle EBS Footprint for Radical Eff...Datavail
 
Rebooting design in RavenDB
Rebooting design in RavenDBRebooting design in RavenDB
Rebooting design in RavenDBOren Eini
 
KoprowskiT_SQLRelay2014#8_Birmingham_FromPlanToBackupToCloud
KoprowskiT_SQLRelay2014#8_Birmingham_FromPlanToBackupToCloudKoprowskiT_SQLRelay2014#8_Birmingham_FromPlanToBackupToCloud
KoprowskiT_SQLRelay2014#8_Birmingham_FromPlanToBackupToCloudTobias Koprowski
 
Handling Massive Writes
Handling Massive WritesHandling Massive Writes
Handling Massive WritesLiran Zelkha
 
S424. Soa Mainframe Practices Best And Worst
S424. Soa Mainframe Practices   Best And WorstS424. Soa Mainframe Practices   Best And Worst
S424. Soa Mainframe Practices Best And WorstMichaelErichsen
 
Bentley’s travels in the open source world foss4 g2017
Bentley’s travels in the open source world foss4 g2017Bentley’s travels in the open source world foss4 g2017
Bentley’s travels in the open source world foss4 g2017Pano Voudouris
 
MySQL :What's New #GIDS16
MySQL :What's New #GIDS16MySQL :What's New #GIDS16
MySQL :What's New #GIDS16Sanjay Manwani
 
Implementation of Oracle ExaData and OFM 11g with Banner in HCT
Implementation of Oracle ExaData and OFM 11g with Banner in HCTImplementation of Oracle ExaData and OFM 11g with Banner in HCT
Implementation of Oracle ExaData and OFM 11g with Banner in HCTKhalid Tariq
 
MySQL @ the University Of Nottingham
MySQL @ the University Of NottinghamMySQL @ the University Of Nottingham
MySQL @ the University Of NottinghamMark Swarbrick
 
Cisco Base Environment Overview
Cisco Base Environment OverviewCisco Base Environment Overview
Cisco Base Environment OverviewDVClub
 

Similar a MySQL Performance Tuning: Top 10 Tips (20)

Is OLAP Dead?: Can Next Gen Tools Take Over?
Is OLAP Dead?: Can Next Gen Tools Take Over?Is OLAP Dead?: Can Next Gen Tools Take Over?
Is OLAP Dead?: Can Next Gen Tools Take Over?
 
Kognitio feb 2013
Kognitio feb 2013Kognitio feb 2013
Kognitio feb 2013
 
NISO Standards and Best Practices: Standardized Usage Statistics Harvesting I...
NISO Standards and Best Practices: Standardized Usage Statistics Harvesting I...NISO Standards and Best Practices: Standardized Usage Statistics Harvesting I...
NISO Standards and Best Practices: Standardized Usage Statistics Harvesting I...
 
Kognitio overview april 2013
Kognitio overview april 2013Kognitio overview april 2013
Kognitio overview april 2013
 
Mnod linsync10 oba
Mnod linsync10 obaMnod linsync10 oba
Mnod linsync10 oba
 
Toad for Sybase Datasheet
Toad for Sybase DatasheetToad for Sybase Datasheet
Toad for Sybase Datasheet
 
2013 CPM Conference, Nov 6th, NoSQL Capacity Planning
2013 CPM Conference, Nov 6th, NoSQL Capacity Planning2013 CPM Conference, Nov 6th, NoSQL Capacity Planning
2013 CPM Conference, Nov 6th, NoSQL Capacity Planning
 
CICS TS for z/OS, From Waterfall to Agile using Rational Jazz Technology - no...
CICS TS for z/OS, From Waterfall to Agile using Rational Jazz Technology - no...CICS TS for z/OS, From Waterfall to Agile using Rational Jazz Technology - no...
CICS TS for z/OS, From Waterfall to Agile using Rational Jazz Technology - no...
 
Adf and ala design c sharp corner toronto chapter feb 2019 meetup nik shahriar
Adf and ala design c sharp corner toronto chapter feb 2019 meetup nik shahriarAdf and ala design c sharp corner toronto chapter feb 2019 meetup nik shahriar
Adf and ala design c sharp corner toronto chapter feb 2019 meetup nik shahriar
 
Collaborate 2018: Optimizing Your Robust Oracle EBS Footprint for Radical Eff...
Collaborate 2018: Optimizing Your Robust Oracle EBS Footprint for Radical Eff...Collaborate 2018: Optimizing Your Robust Oracle EBS Footprint for Radical Eff...
Collaborate 2018: Optimizing Your Robust Oracle EBS Footprint for Radical Eff...
 
Rebooting design in RavenDB
Rebooting design in RavenDBRebooting design in RavenDB
Rebooting design in RavenDB
 
KoprowskiT_SQLRelay2014#8_Birmingham_FromPlanToBackupToCloud
KoprowskiT_SQLRelay2014#8_Birmingham_FromPlanToBackupToCloudKoprowskiT_SQLRelay2014#8_Birmingham_FromPlanToBackupToCloud
KoprowskiT_SQLRelay2014#8_Birmingham_FromPlanToBackupToCloud
 
Handling Massive Writes
Handling Massive WritesHandling Massive Writes
Handling Massive Writes
 
S424. Soa Mainframe Practices Best And Worst
S424. Soa Mainframe Practices   Best And WorstS424. Soa Mainframe Practices   Best And Worst
S424. Soa Mainframe Practices Best And Worst
 
Bentley’s travels in the open source world foss4 g2017
Bentley’s travels in the open source world foss4 g2017Bentley’s travels in the open source world foss4 g2017
Bentley’s travels in the open source world foss4 g2017
 
MySQL :What's New #GIDS16
MySQL :What's New #GIDS16MySQL :What's New #GIDS16
MySQL :What's New #GIDS16
 
Implementation of Oracle ExaData and OFM 11g with Banner in HCT
Implementation of Oracle ExaData and OFM 11g with Banner in HCTImplementation of Oracle ExaData and OFM 11g with Banner in HCT
Implementation of Oracle ExaData and OFM 11g with Banner in HCT
 
Cutting edge Essbase
Cutting edge EssbaseCutting edge Essbase
Cutting edge Essbase
 
MySQL @ the University Of Nottingham
MySQL @ the University Of NottinghamMySQL @ the University Of Nottingham
MySQL @ the University Of Nottingham
 
Cisco Base Environment Overview
Cisco Base Environment OverviewCisco Base Environment Overview
Cisco Base Environment Overview
 

Más de OSSCube

High Availability Using MySQL Group Replication
High Availability Using MySQL Group ReplicationHigh Availability Using MySQL Group Replication
High Availability Using MySQL Group ReplicationOSSCube
 
Accelerate Your Digital Transformation Journey with Pimcore
Accelerate Your Digital Transformation Journey with PimcoreAccelerate Your Digital Transformation Journey with Pimcore
Accelerate Your Digital Transformation Journey with PimcoreOSSCube
 
Migrating Legacy Applications to AWS Cloud: Strategies and Challenges
Migrating Legacy Applications to AWS Cloud: Strategies and ChallengesMigrating Legacy Applications to AWS Cloud: Strategies and Challenges
Migrating Legacy Applications to AWS Cloud: Strategies and ChallengesOSSCube
 
Why Does Omnichannel Experience Matter to Your Customers
Why Does Omnichannel Experience Matter to Your CustomersWhy Does Omnichannel Experience Matter to Your Customers
Why Does Omnichannel Experience Matter to Your CustomersOSSCube
 
Using MySQL Fabric for High Availability and Scaling Out
Using MySQL Fabric for High Availability and Scaling OutUsing MySQL Fabric for High Availability and Scaling Out
Using MySQL Fabric for High Availability and Scaling OutOSSCube
 
Webinar: Five Ways a Technology Refresh Strategy Can Help Make Your Digital T...
Webinar: Five Ways a Technology Refresh Strategy Can Help Make Your Digital T...Webinar: Five Ways a Technology Refresh Strategy Can Help Make Your Digital T...
Webinar: Five Ways a Technology Refresh Strategy Can Help Make Your Digital T...OSSCube
 
Cutting Through the Disruption
Cutting Through the DisruptionCutting Through the Disruption
Cutting Through the DisruptionOSSCube
 
Legacy to industry leader: a modernization case study
Legacy to industry leader: a modernization case studyLegacy to industry leader: a modernization case study
Legacy to industry leader: a modernization case studyOSSCube
 
Marketing and Sales together at last
Marketing and Sales together at lastMarketing and Sales together at last
Marketing and Sales together at lastOSSCube
 
Using pim to maximize revenue and improve customer satisfaction
Using pim to maximize revenue and improve customer satisfactionUsing pim to maximize revenue and improve customer satisfaction
Using pim to maximize revenue and improve customer satisfactionOSSCube
 
Talend for the Enterprise
Talend for the EnterpriseTalend for the Enterprise
Talend for the EnterpriseOSSCube
 
Ahead of the Curve
Ahead of the CurveAhead of the Curve
Ahead of the CurveOSSCube
 
Non functional requirements. do we really care…?
Non functional requirements. do we really care…?Non functional requirements. do we really care…?
Non functional requirements. do we really care…?OSSCube
 
Learning from experience: Collaborative Journey towards CMMI
Learning from experience: Collaborative Journey towards CMMILearning from experience: Collaborative Journey towards CMMI
Learning from experience: Collaborative Journey towards CMMIOSSCube
 
Exploiting JXL using Selenium
Exploiting JXL using SeleniumExploiting JXL using Selenium
Exploiting JXL using SeleniumOSSCube
 
Introduction to AWS
Introduction to AWSIntroduction to AWS
Introduction to AWSOSSCube
 
Maria DB Galera Cluster for High Availability
Maria DB Galera Cluster for High AvailabilityMaria DB Galera Cluster for High Availability
Maria DB Galera Cluster for High AvailabilityOSSCube
 
Talend Open Studio Introduction - OSSCamp 2014
Talend Open Studio Introduction - OSSCamp 2014Talend Open Studio Introduction - OSSCamp 2014
Talend Open Studio Introduction - OSSCamp 2014OSSCube
 
Performance Testing Session - OSSCamp 2014
Performance Testing Session -  OSSCamp 2014Performance Testing Session -  OSSCamp 2014
Performance Testing Session - OSSCamp 2014OSSCube
 
Job Queue Presentation - OSSCamp 2014
Job Queue Presentation - OSSCamp 2014Job Queue Presentation - OSSCamp 2014
Job Queue Presentation - OSSCamp 2014OSSCube
 

Más de OSSCube (20)

High Availability Using MySQL Group Replication
High Availability Using MySQL Group ReplicationHigh Availability Using MySQL Group Replication
High Availability Using MySQL Group Replication
 
Accelerate Your Digital Transformation Journey with Pimcore
Accelerate Your Digital Transformation Journey with PimcoreAccelerate Your Digital Transformation Journey with Pimcore
Accelerate Your Digital Transformation Journey with Pimcore
 
Migrating Legacy Applications to AWS Cloud: Strategies and Challenges
Migrating Legacy Applications to AWS Cloud: Strategies and ChallengesMigrating Legacy Applications to AWS Cloud: Strategies and Challenges
Migrating Legacy Applications to AWS Cloud: Strategies and Challenges
 
Why Does Omnichannel Experience Matter to Your Customers
Why Does Omnichannel Experience Matter to Your CustomersWhy Does Omnichannel Experience Matter to Your Customers
Why Does Omnichannel Experience Matter to Your Customers
 
Using MySQL Fabric for High Availability and Scaling Out
Using MySQL Fabric for High Availability and Scaling OutUsing MySQL Fabric for High Availability and Scaling Out
Using MySQL Fabric for High Availability and Scaling Out
 
Webinar: Five Ways a Technology Refresh Strategy Can Help Make Your Digital T...
Webinar: Five Ways a Technology Refresh Strategy Can Help Make Your Digital T...Webinar: Five Ways a Technology Refresh Strategy Can Help Make Your Digital T...
Webinar: Five Ways a Technology Refresh Strategy Can Help Make Your Digital T...
 
Cutting Through the Disruption
Cutting Through the DisruptionCutting Through the Disruption
Cutting Through the Disruption
 
Legacy to industry leader: a modernization case study
Legacy to industry leader: a modernization case studyLegacy to industry leader: a modernization case study
Legacy to industry leader: a modernization case study
 
Marketing and Sales together at last
Marketing and Sales together at lastMarketing and Sales together at last
Marketing and Sales together at last
 
Using pim to maximize revenue and improve customer satisfaction
Using pim to maximize revenue and improve customer satisfactionUsing pim to maximize revenue and improve customer satisfaction
Using pim to maximize revenue and improve customer satisfaction
 
Talend for the Enterprise
Talend for the EnterpriseTalend for the Enterprise
Talend for the Enterprise
 
Ahead of the Curve
Ahead of the CurveAhead of the Curve
Ahead of the Curve
 
Non functional requirements. do we really care…?
Non functional requirements. do we really care…?Non functional requirements. do we really care…?
Non functional requirements. do we really care…?
 
Learning from experience: Collaborative Journey towards CMMI
Learning from experience: Collaborative Journey towards CMMILearning from experience: Collaborative Journey towards CMMI
Learning from experience: Collaborative Journey towards CMMI
 
Exploiting JXL using Selenium
Exploiting JXL using SeleniumExploiting JXL using Selenium
Exploiting JXL using Selenium
 
Introduction to AWS
Introduction to AWSIntroduction to AWS
Introduction to AWS
 
Maria DB Galera Cluster for High Availability
Maria DB Galera Cluster for High AvailabilityMaria DB Galera Cluster for High Availability
Maria DB Galera Cluster for High Availability
 
Talend Open Studio Introduction - OSSCamp 2014
Talend Open Studio Introduction - OSSCamp 2014Talend Open Studio Introduction - OSSCamp 2014
Talend Open Studio Introduction - OSSCamp 2014
 
Performance Testing Session - OSSCamp 2014
Performance Testing Session -  OSSCamp 2014Performance Testing Session -  OSSCamp 2014
Performance Testing Session - OSSCamp 2014
 
Job Queue Presentation - OSSCamp 2014
Job Queue Presentation - OSSCamp 2014Job Queue Presentation - OSSCamp 2014
Job Queue Presentation - OSSCamp 2014
 

Último

08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking MenDelhi Call girls
 
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024BookNet Canada
 
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...Neo4j
 
How to convert PDF to text with Nanonets
How to convert PDF to text with NanonetsHow to convert PDF to text with Nanonets
How to convert PDF to text with Nanonetsnaman860154
 
A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024Results
 
Swan(sea) Song – personal research during my six years at Swansea ... and bey...
Swan(sea) Song – personal research during my six years at Swansea ... and bey...Swan(sea) Song – personal research during my six years at Swansea ... and bey...
Swan(sea) Song – personal research during my six years at Swansea ... and bey...Alan Dix
 
IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsEnterprise Knowledge
 
Unblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen FramesUnblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen FramesSinan KOZAK
 
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Miguel Araújo
 
CNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of ServiceCNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of Servicegiselly40
 
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...HostedbyConfluent
 
The Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxThe Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxMalak Abu Hammad
 
Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slideHistor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slidevu2urc
 
🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘RTylerCroy
 
My Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationMy Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationRidwan Fadjar
 
Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)Allon Mureinik
 
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024BookNet Canada
 
Google AI Hackathon: LLM based Evaluator for RAG
Google AI Hackathon: LLM based Evaluator for RAGGoogle AI Hackathon: LLM based Evaluator for RAG
Google AI Hackathon: LLM based Evaluator for RAGSujit Pal
 
08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking MenDelhi Call girls
 
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...shyamraj55
 

Último (20)

08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
 
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
 
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
 
How to convert PDF to text with Nanonets
How to convert PDF to text with NanonetsHow to convert PDF to text with Nanonets
How to convert PDF to text with Nanonets
 
A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024
 
Swan(sea) Song – personal research during my six years at Swansea ... and bey...
Swan(sea) Song – personal research during my six years at Swansea ... and bey...Swan(sea) Song – personal research during my six years at Swansea ... and bey...
Swan(sea) Song – personal research during my six years at Swansea ... and bey...
 
IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI Solutions
 
Unblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen FramesUnblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen Frames
 
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
 
CNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of ServiceCNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of Service
 
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...
 
The Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxThe Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptx
 
Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slideHistor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slide
 
🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘
 
My Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationMy Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 Presentation
 
Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)
 
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
 
Google AI Hackathon: LLM based Evaluator for RAG
Google AI Hackathon: LLM based Evaluator for RAGGoogle AI Hackathon: LLM based Evaluator for RAG
Google AI Hackathon: LLM based Evaluator for RAG
 
08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men
 
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
 

MySQL Performance Tuning: Top 10 Tips

  • 1. OSS Cube|OSI Days 2010 1 1 MySQL Performance Tuning: Top 10 Tips Presented by :- Sonali Minocha Osscube, New Delhi
  • 2. OSS Cube|OSI Days 2010 2 2 Why Tune a Database? Cost-effectiveness o A system that is tuned can minimize the need to buy additional hardware and other resources to meet the needs of the end users. o Tuning may demonstrate that the system being used is excessive for the end users and downsizing is the better option. This may result in multiple levels of savings to include maintenance. · Performance o A high-performance, well-tuned system produces faster response time and better throughput within the organization. This increases the productivity of the end users. o A well-tuned system benefits the organization’s customers, poor response time causes lot of unhappiness and loses business. · Competitive Advantage o Tuning a system for optimal performance gives the end users the ability to glean more critical information faster than the competitors thus giving the company as a whole an advantage. o Tuning the access to the data helps business analysts, who are utilizing business intelligence initiatives based on corporate data, make faster and more precise decisions.
  • 3. OSS Cube|OSI Days 2010 3 3 Who Tunes? • All persons involved with the MySQL software should be concerned with performance and involved in tuning. Consider all phases of the System Development Life Cycle (SDLC) as opportunities to create and enhance an effective, well designed and efficient system. • · Application Designers • · Application Developers • · Database Administrators • · System Administrators
  • 4. OSS Cube|OSI Days 2010 4 4 What is Tuned? Careful design of systems and applications is essential to the optimal performance of any database. In most cases the greatest gain in performance can be achieved through tuning the application. The most opportune time to consider performance issues is when the application is in the very early stages of the SDLC. • · Application Design • · Application Development • · Database Structures • · Hardware
  • 5. OSS Cube|OSI Days 2010 5 5 When should Tuning be accomplished? • · From the beginning • · Routine tune-ups • · Response to problems/bottlenecks • · Proactive Tuning • · End-of-life • o Bottom line, performance tuning is never finished. As long as the database system is in • place, the DBA will continually be adjusting the database architecture to meet the • continual needs of the end user. • Tuning Outcome • The effect of tuning should be readily apparent to the end user. For this reason, the tuning outcome • should be to: • · Minimize or decrease the response time • · Provide high throughput scalability at comparable response times • Tuning Targets • Tuning goals can be defined in numerous ways. In many cases the goals are set by the users of the • system in order for them to perform their daily functions efficiently. • · How much data needs to be processed? • · How quickly can the information be returned to the user? • · What is the total number of users that can efficiently access the data?
  • 6. OSS Cube|OSI Days 2010 6 6 How much tuning is enough? • Too Little Tuning • Too Much Tuning • Other Questions to Consider • · Is the cost of improving the database architecture or adding additional resources cost effective for the return on investment that the data is providing to the organization? • · Are changes made to database systems that are in production? • · Is the integrity of the data being compromised for speed? • There comes a point when the system is in balance, and it is better not to adjust settings to achieve infinitesimally small performance improvements. • Caution is required when making changes once a system is in production. For best results, always try to build a test environment
  • 7. OSS Cube|OSI Days 2010 7 7 Stages of Tuning • Application design • Application development • Database configuration • Application maintenance and growth • Troubleshooting
  • 8. OSS Cube|OSI Days 2010 8 8 Measurement Methods • Benchmarking • Profiling • Benchmarking Vs Profiling
  • 9. OSS Cube|OSI Days 2010 9 9 Application Development (Optimizing Queries)
  • 10. OSS Cube|OSI Days 2010 10 10 Indexes • In MySQL there are several types of indexes: – Tree Indexes • B-Trees – FULLTEXT indexes (based on words instead of whole columns) • B+Trees (InnoDB) • T-Trees (NDB) • Red-black binary trees (MEMORY) • R-Trees (MyISAM, spatial indexes) – Hash indexes (MEMORY and NDB) • The use of indexes to find rows speedes up most queries • Writes become slower with each added index
  • 11. OSS Cube|OSI Days 2010 11 11 Query Execution Plan (EXPLAIN) • With EXPLAIN the query is sent all the way to the optimizer, but not to the storage engine • Instead EXPLAIN returns the query execution plan • EXPLAIN tells you: – In which order the tables are read – What types of read operations that are made – Which indexes could have been used – Which indexes are used – How the tables refer to each other – How many rows the optimizer estimates to retrieve from each table
  • 12. OSS Cube|OSI Days 2010 12 12 EXPLAIN Types system The table has only one row const At the most one matching row, treated as a constant eq_ref One row per row from previous tables ref Several rows with matching index value ref_or_null Like ref, plus NULL values index_merge Several index searches are merged unique_subquery Same as ref for some subqueries index_subquery As above for non-unique indexes range A range index scan index The whole index is scanned ALL A full table scan
  • 13. OSS Cube|OSI Days 2010 13 13 EXPLAIN Extra Using index The result is created straight from the index Using where Not all rows are used in the result Distinct Only a single row is read per row combination Not exists A LEFT JOIN missing rows optimization is used Using filesort An extra row sorting step is done Using temporary A temporary table is used Range checked for each The read type is optimized individually for each combination of rows record from the previous tables
  • 14. OSS Cube|OSI Days 2010 14 14 Optimizer Hints STRAIGHT_JOIN Forces the optimizer to join the tables in the given order SQL_BIG_RESULTS Together with GROUP BY or DISTINCT tells the server to use disk-based temp tables SQL_BUFFER_RESULTS Tells the server to use a temp table, thus releasing locks early (for table-locks) USE INDEX Hints to the optimizer to use the given index FORCE INDEX Forces the optimizer to use the index (if possible) IGNORE INDEX Forces the optimizer not the use the index
  • 15. OSS Cube|OSI Days 2010 15 15 Selecting Queries to Optimize • The slow query log – Logs all queries that take longer than long_query_time – Can also log all queries that don’t use indexes with --log-queries-not-using-indexes – To log slow administrative commands use --log-slow-admin-statements – To analyze the contents of the slow log use mysqldumpslow • The general query log can be use to analyze: – Reads vs. writes – Simple queries vs. complex queries – etc
  • 16. OSS Cube|OSI Days 2010 16 16 Database Designing (Optimizing Schemas)
  • 17. OSS Cube|OSI Days 2010 17 17 Normalization • Normalization is a key factor in optimizing your database structure – Good normalization prevents redundant data from being stored in the same tables – By moving redundant data to their own table, this reduces storage requirements and overhead when processing queries – Transactional databases should be in the 3rd normal form • For data warehousing and reporting system a star-schema might be a better solution
  • 18. OSS Cube|OSI Days 2010 18 18 Table Optimizations • Use columns that are as short as possible; – INT instead of BIGINT – VARCHAR(10) instead of VARCHAR(255) – etc. • Pay special attention to columns that are used in joins • Define columns as NOT NULL if possible • For hints on saving space, use PROCEDURE ANALYSE() • For data warehousing or reporting systems consider using summary tables for speed
  • 19. OSS Cube|OSI Days 2010 19 19 Index Optimizations • An index on the whole column is not always necessary – Instead index just a prefix of a column – Prefix indexes take less space and the operations are faster • Composite indexes can be used for searches on the first column(s) in the index • Minimize the size of PRIMARY KEYs that are used as references in other tables – Using an auto_increment column can be more optimal • A FULLTEXT index is useful for – word searches in text – searches on several columns
  • 20. OSS Cube|OSI Days 2010 20 20 MyISAM-Specific Optimizations • Consider which row format to use, dynamic, static or compressed – Speed vs. space • Consider splitting large tables into static and dynamic parts • Important to perform table maintenance operations regularly or after big DELETE/UPDATE operations – Especially on tables with dynamic row format • Change the row-pointer size (default 6b) for large (>256Tb) tables or smaller (< 4Gb) tables
  • 21. OSS Cube|OSI Days 2010 21 21 InnoDB-Specific Optimizations • InnoDB uses clustered indexes – The length of the PRIMARY KEY is extremely important • The rows are always dynamic – Using VARCHAR instead of CHAR is almost always better • Maintenance operations needed after – Many UPDATE/DELETE operations • The pages can become underfilled
  • 22. OSS Cube|OSI Days 2010 22 22 MEMORY-Specific Optimizations • Use BTREE (Red-black binary trees) indexes – When key duplication is high – When you need range searches • Set a size limit for your memory tables – With --max_heap_table_size • Remove unused memory – TRUNCATE TABLE to completely remove the contents of the table – A null ALTER TABLE to free up deleted rows
  • 23. OSS Cube|OSI Days 2010 23 23 Optimizing the Server
  • 24. OSS Cube|OSI Days 2010 24 24 Performance Monitoring • Server performance can be tracked using native OS tools – vmstat, iostat, mpstat on Unix – performance counters on Windows • The mysqld server tracks crucial performance counters – SHOW STATUS gives you a snapshot – Can use Cricket, SNMP, custom scripts to graph over time – MySQL Administrator • Default graphs • Allows you to create your own graphs • Queries can be tracked using log files – Can collect every query submitted to the server – Slow queries can be logged easily
  • 25. OSS Cube|OSI Days 2010 25 25 Monitoring Threads in MySQL • To get a snapshot of all threads in MySQL – SHOW FULL PROCESSLIST – The state column shows what’s going on for each query • Performance problems can often be detected by – Monitoring the processlist – Verifying status variables • Imminent problems can be eliminated by – Terminating runaway or unnecessary threads with KILL
  • 26. OSS Cube|OSI Days 2010 26 26 Tuning MySQL Parameters • Some MySQL options can be changed online • The dynamic options are either – SESSION specific • Changing the value will only affect the current connection – GLOBAL • Changing the value will affect the whole server – Both • When changing the value SESSION/GLOBAL should be specified • Online changes are not persistant over a server restart – The configuration files have to be changed as well • The current values of all options can be found with SHOW SESSION/GLOBAL VARIABLES
  • 27. OSS Cube|OSI Days 2010 27 27 Status Variables • MySQL collects lots of status indicators – These can be monitored with SHOW STATUS • The variables provide a way of monitoring the server activity • They also act as guides when optimizing the server • The variables can also be viewed with – mysqladmin extended-status – MySQL Administrator • Provides graphical interface for monitoring the variables • Can be very efficient for tracking the health of the server
  • 28. OSS Cube|OSI Days 2010 28 28 Some Global Options • table_cache (default 64) – Cache for storing open table handlers – Increase this if Opened_tables is high • thread_cache (default 0) – Number of threads to keep for reuse – Increase if threads_created is high – Not useful if the client uses connection pooling • max_connections (default 100) – The maximum allowed number of simultaneous connections – Very important for tuning thread specific memory areas – Each connection uses at least thread_stack of memory
  • 29. OSS Cube|OSI Days 2010 29 29 MyISAM Global Options • key_buffer_size (default 8Mb) – Cache for storing indices – Increase this to get better index handling – Miss ratio (key_reads/key_read_requests) should be very low, at least < 0.03 (often < 0.01 is desirable) • Row caching is handled by the OS
  • 30. OSS Cube|OSI Days 2010 30 30 MyISAM Thread-Specific Options • myisam_sort_buffer_size (default 8Mb) – Used when sorting indexes during REPAIR/ALTER TABLE • myisam_repair_threads (default 1) – Used for bulk import and repairing – Allows for repairing indexes in multiple threads • myisam_max_sort_file_size – The max size of the file used while re-creating indexes
  • 31. OSS Cube|OSI Days 2010 31 31 InnoDB-Specific Optimization 1/2 • innodb_buffer_pool_size (default 8Mb) – The memory buffer InnoDB uses to cache both data and indexes – The bigger you set this the less disk i/o is needed – Can be set very high (up to 80% on a dedicated system) • innodb_flush_log_at_trx_commit (default 1) – 0 writes and sync’s once per second (not ACID) – 1 forces sync to disk after every commit – 2 write to disk every commit but only sync’s about once per second
  • 32. OSS Cube|OSI Days 2010 32 32 InnoDB-Specific Optimization 2/2 • innodb_log_buffer_size (default 1Mb) – Larger values allows for larger transactions to be logged in memory – Sensible values range from 1M to 8M • innodb_log_file_size (default 5Mb) – Size of each InnoDB redo log file – Can be set up to buffer_pool_size
  • 33. OSS Cube|OSI Days 2010 33 33 Q&A
  • 34. OSS Cube|OSI Days 2010 34 34 Thank you