SlideShare une entreprise Scribd logo
1  sur  34
Télécharger pour lire hors ligne
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

Contenu connexe

Tendances

How to Analyze and Tune MySQL Queries for Better Performance
How to Analyze and Tune MySQL Queries for Better PerformanceHow to Analyze and Tune MySQL Queries for Better Performance
How to Analyze and Tune MySQL Queries for Better Performanceoysteing
 
MySQL Performance for DevOps
MySQL Performance for DevOpsMySQL Performance for DevOps
MySQL Performance for DevOpsSveta Smirnova
 
PostgreSQL Deep Internal
PostgreSQL Deep InternalPostgreSQL Deep Internal
PostgreSQL Deep InternalEXEM
 
Mysql index
Mysql indexMysql index
Mysql indexYuan Yao
 
How to use histograms to get better performance
How to use histograms to get better performanceHow to use histograms to get better performance
How to use histograms to get better performanceMariaDB plc
 
MySQL Index Cookbook
MySQL Index CookbookMySQL Index Cookbook
MySQL Index CookbookMYXPLAIN
 
MySQL 8.0.18 latest updates: Hash join and EXPLAIN ANALYZE
MySQL 8.0.18 latest updates: Hash join and EXPLAIN ANALYZEMySQL 8.0.18 latest updates: Hash join and EXPLAIN ANALYZE
MySQL 8.0.18 latest updates: Hash join and EXPLAIN ANALYZENorvald Ryeng
 
MySQL Indexing - Best practices for MySQL 5.6
MySQL Indexing - Best practices for MySQL 5.6MySQL Indexing - Best practices for MySQL 5.6
MySQL Indexing - Best practices for MySQL 5.6MYXPLAIN
 
More mastering the art of indexing
More mastering the art of indexingMore mastering the art of indexing
More mastering the art of indexingYoshinori Matsunobu
 
MySQL Performance Schema in Action: the Complete Tutorial
MySQL Performance Schema in Action: the Complete TutorialMySQL Performance Schema in Action: the Complete Tutorial
MySQL Performance Schema in Action: the Complete TutorialSveta Smirnova
 
Parallel Replication in MySQL and MariaDB
Parallel Replication in MySQL and MariaDBParallel Replication in MySQL and MariaDB
Parallel Replication in MySQL and MariaDBMydbops
 
MySQL Architecture and Engine
MySQL Architecture and EngineMySQL Architecture and Engine
MySQL Architecture and EngineAbdul Manaf
 
MySQL Performance Schema in Action
MySQL Performance Schema in ActionMySQL Performance Schema in Action
MySQL Performance Schema in ActionSveta Smirnova
 
Streaming Operational Data with MariaDB MaxScale
Streaming Operational Data with MariaDB MaxScaleStreaming Operational Data with MariaDB MaxScale
Streaming Operational Data with MariaDB MaxScaleMariaDB plc
 
Histogram-in-Parallel-universe-of-MySQL-and-MariaDB
Histogram-in-Parallel-universe-of-MySQL-and-MariaDBHistogram-in-Parallel-universe-of-MySQL-and-MariaDB
Histogram-in-Parallel-universe-of-MySQL-and-MariaDBMydbops
 
ProxySQL for MySQL
ProxySQL for MySQLProxySQL for MySQL
ProxySQL for MySQLMydbops
 
MySQL: Indexing for Better Performance
MySQL: Indexing for Better PerformanceMySQL: Indexing for Better Performance
MySQL: Indexing for Better Performancejkeriaki
 
MySQL Administrator 2021 - 네오클로바
MySQL Administrator 2021 - 네오클로바MySQL Administrator 2021 - 네오클로바
MySQL Administrator 2021 - 네오클로바NeoClova
 
MySQL Parallel Replication: All the 5.7 and 8.0 Details (LOGICAL_CLOCK)
MySQL Parallel Replication: All the 5.7 and 8.0 Details (LOGICAL_CLOCK)MySQL Parallel Replication: All the 5.7 and 8.0 Details (LOGICAL_CLOCK)
MySQL Parallel Replication: All the 5.7 and 8.0 Details (LOGICAL_CLOCK)Jean-François Gagné
 

Tendances (20)

How to Analyze and Tune MySQL Queries for Better Performance
How to Analyze and Tune MySQL Queries for Better PerformanceHow to Analyze and Tune MySQL Queries for Better Performance
How to Analyze and Tune MySQL Queries for Better Performance
 
MySQL Performance for DevOps
MySQL Performance for DevOpsMySQL Performance for DevOps
MySQL Performance for DevOps
 
PostgreSQL Deep Internal
PostgreSQL Deep InternalPostgreSQL Deep Internal
PostgreSQL Deep Internal
 
Mysql index
Mysql indexMysql index
Mysql index
 
How to use histograms to get better performance
How to use histograms to get better performanceHow to use histograms to get better performance
How to use histograms to get better performance
 
MySQL Index Cookbook
MySQL Index CookbookMySQL Index Cookbook
MySQL Index Cookbook
 
Get to know PostgreSQL!
Get to know PostgreSQL!Get to know PostgreSQL!
Get to know PostgreSQL!
 
MySQL 8.0.18 latest updates: Hash join and EXPLAIN ANALYZE
MySQL 8.0.18 latest updates: Hash join and EXPLAIN ANALYZEMySQL 8.0.18 latest updates: Hash join and EXPLAIN ANALYZE
MySQL 8.0.18 latest updates: Hash join and EXPLAIN ANALYZE
 
MySQL Indexing - Best practices for MySQL 5.6
MySQL Indexing - Best practices for MySQL 5.6MySQL Indexing - Best practices for MySQL 5.6
MySQL Indexing - Best practices for MySQL 5.6
 
More mastering the art of indexing
More mastering the art of indexingMore mastering the art of indexing
More mastering the art of indexing
 
MySQL Performance Schema in Action: the Complete Tutorial
MySQL Performance Schema in Action: the Complete TutorialMySQL Performance Schema in Action: the Complete Tutorial
MySQL Performance Schema in Action: the Complete Tutorial
 
Parallel Replication in MySQL and MariaDB
Parallel Replication in MySQL and MariaDBParallel Replication in MySQL and MariaDB
Parallel Replication in MySQL and MariaDB
 
MySQL Architecture and Engine
MySQL Architecture and EngineMySQL Architecture and Engine
MySQL Architecture and Engine
 
MySQL Performance Schema in Action
MySQL Performance Schema in ActionMySQL Performance Schema in Action
MySQL Performance Schema in Action
 
Streaming Operational Data with MariaDB MaxScale
Streaming Operational Data with MariaDB MaxScaleStreaming Operational Data with MariaDB MaxScale
Streaming Operational Data with MariaDB MaxScale
 
Histogram-in-Parallel-universe-of-MySQL-and-MariaDB
Histogram-in-Parallel-universe-of-MySQL-and-MariaDBHistogram-in-Parallel-universe-of-MySQL-and-MariaDB
Histogram-in-Parallel-universe-of-MySQL-and-MariaDB
 
ProxySQL for MySQL
ProxySQL for MySQLProxySQL for MySQL
ProxySQL for MySQL
 
MySQL: Indexing for Better Performance
MySQL: Indexing for Better PerformanceMySQL: Indexing for Better Performance
MySQL: Indexing for Better Performance
 
MySQL Administrator 2021 - 네오클로바
MySQL Administrator 2021 - 네오클로바MySQL Administrator 2021 - 네오클로바
MySQL Administrator 2021 - 네오클로바
 
MySQL Parallel Replication: All the 5.7 and 8.0 Details (LOGICAL_CLOCK)
MySQL Parallel Replication: All the 5.7 and 8.0 Details (LOGICAL_CLOCK)MySQL Parallel Replication: All the 5.7 and 8.0 Details (LOGICAL_CLOCK)
MySQL Parallel Replication: All the 5.7 and 8.0 Details (LOGICAL_CLOCK)
 

En vedette

MySQL Performance Tips & Best Practices
MySQL Performance Tips & Best PracticesMySQL Performance Tips & Best Practices
MySQL Performance Tips & Best PracticesIsaac Mosquera
 
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
 
Mysql Explain Explained
Mysql Explain ExplainedMysql Explain Explained
Mysql Explain ExplainedJeremy Coates
 
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
 

En vedette (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 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)
 
Mysql Explain Explained
Mysql Explain ExplainedMysql Explain Explained
Mysql Explain Explained
 
Explain that explain
Explain that explainExplain that explain
Explain that explain
 
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
 

Similaire à 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
 

Similaire à 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
 

Plus 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
 

Plus 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
 

Dernier

My INSURER PTE LTD - Insurtech Innovation Award 2024
My INSURER PTE LTD - Insurtech Innovation Award 2024My INSURER PTE LTD - Insurtech Innovation Award 2024
My INSURER PTE LTD - Insurtech Innovation Award 2024The Digital Insurer
 
Commit 2024 - Secret Management made easy
Commit 2024 - Secret Management made easyCommit 2024 - Secret Management made easy
Commit 2024 - Secret Management made easyAlfredo García Lavilla
 
What's New in Teams Calling, Meetings and Devices March 2024
What's New in Teams Calling, Meetings and Devices March 2024What's New in Teams Calling, Meetings and Devices March 2024
What's New in Teams Calling, Meetings and Devices March 2024Stephanie Beckett
 
Artificial intelligence in cctv survelliance.pptx
Artificial intelligence in cctv survelliance.pptxArtificial intelligence in cctv survelliance.pptx
Artificial intelligence in cctv survelliance.pptxhariprasad279825
 
Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?Mattias Andersson
 
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)Mark Simos
 
Unleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding ClubUnleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding ClubKalema Edgar
 
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks..."LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...Fwdays
 
"Federated learning: out of reach no matter how close",Oleksandr Lapshyn
"Federated learning: out of reach no matter how close",Oleksandr Lapshyn"Federated learning: out of reach no matter how close",Oleksandr Lapshyn
"Federated learning: out of reach no matter how close",Oleksandr LapshynFwdays
 
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024BookNet Canada
 
Story boards and shot lists for my a level piece
Story boards and shot lists for my a level pieceStory boards and shot lists for my a level piece
Story boards and shot lists for my a level piececharlottematthew16
 
Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 365Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 3652toLead Limited
 
Dev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio WebDev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio WebUiPathCommunity
 
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)Bun (KitWorks Team Study 노별마루 발표 2024.4.22)
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)Wonjun Hwang
 
My Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationMy Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationRidwan Fadjar
 
SAP Build Work Zone - Overview L2-L3.pptx
SAP Build Work Zone - Overview L2-L3.pptxSAP Build Work Zone - Overview L2-L3.pptx
SAP Build Work Zone - Overview L2-L3.pptxNavinnSomaal
 
Leverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage Cost
Leverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage CostLeverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage Cost
Leverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage CostZilliz
 
CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):comworks
 
Scanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL CertsScanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL CertsRizwan Syed
 
AI as an Interface for Commercial Buildings
AI as an Interface for Commercial BuildingsAI as an Interface for Commercial Buildings
AI as an Interface for Commercial BuildingsMemoori
 

Dernier (20)

My INSURER PTE LTD - Insurtech Innovation Award 2024
My INSURER PTE LTD - Insurtech Innovation Award 2024My INSURER PTE LTD - Insurtech Innovation Award 2024
My INSURER PTE LTD - Insurtech Innovation Award 2024
 
Commit 2024 - Secret Management made easy
Commit 2024 - Secret Management made easyCommit 2024 - Secret Management made easy
Commit 2024 - Secret Management made easy
 
What's New in Teams Calling, Meetings and Devices March 2024
What's New in Teams Calling, Meetings and Devices March 2024What's New in Teams Calling, Meetings and Devices March 2024
What's New in Teams Calling, Meetings and Devices March 2024
 
Artificial intelligence in cctv survelliance.pptx
Artificial intelligence in cctv survelliance.pptxArtificial intelligence in cctv survelliance.pptx
Artificial intelligence in cctv survelliance.pptx
 
Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?
 
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
 
Unleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding ClubUnleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding Club
 
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks..."LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
 
"Federated learning: out of reach no matter how close",Oleksandr Lapshyn
"Federated learning: out of reach no matter how close",Oleksandr Lapshyn"Federated learning: out of reach no matter how close",Oleksandr Lapshyn
"Federated learning: out of reach no matter how close",Oleksandr Lapshyn
 
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
 
Story boards and shot lists for my a level piece
Story boards and shot lists for my a level pieceStory boards and shot lists for my a level piece
Story boards and shot lists for my a level piece
 
Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 365Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 365
 
Dev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio WebDev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio Web
 
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)Bun (KitWorks Team Study 노별마루 발표 2024.4.22)
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)
 
My Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationMy Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 Presentation
 
SAP Build Work Zone - Overview L2-L3.pptx
SAP Build Work Zone - Overview L2-L3.pptxSAP Build Work Zone - Overview L2-L3.pptx
SAP Build Work Zone - Overview L2-L3.pptx
 
Leverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage Cost
Leverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage CostLeverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage Cost
Leverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage Cost
 
CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):
 
Scanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL CertsScanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL Certs
 
AI as an Interface for Commercial Buildings
AI as an Interface for Commercial BuildingsAI as an Interface for Commercial Buildings
AI as an Interface for Commercial Buildings
 

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