This document summarizes a presentation by Ronald Bradford on mastering MySQL performance tuning. It introduces Bradford's background and qualifications in MySQL performance. The presentation objectives are to identify key MySQL instrumentation, define important terms, and provide references for further learning. The document then covers important sources of MySQL configuration and status information. It discusses identifying and addressing potential bottlenecks related to memory, disk, CPU, and network usage. Key aspects of system and SQL performance are outlined, including approaches for analyzing throughput and latency. Specific examples are provided to illustrate concepts like memory sizing, MySQL status variables, EXPLAIN plans, and the optimizer trace.
What’s New For SQL Optimization In DB2 9 And DB2 10 For z/OSSurekha Parekh
Abstract:
Reducing the total cost of ownership is everyone’s challenge, and it’s one of the key benefits of query optimization. Since its initial inception in DB2® for z/OS®, the cost-based Optimizer has continually evolved to deliver expert-based query and workload analysis and many other performance-enhancing functions. Based on the latest use by customers, the Optimizer delivers even more in DB2 10. This session will show you how the Optimizer in DB2 10 for z/OS can help reduce your total cost of ownership. We’ll discuss incremental query optimization enhancements available with the upcoming release of DB2 10 that build on DB2 9 enhancements, such as global query optimization. This session will cover the insight discovered in early usage, provide the reason for each enhancement and highlight the most important enhancements.
The History and Future of the MySQL ecosystemRonald Bradford
The history and future of the MySQL Ecosystem. This talk sub-titled “Spaghetti and MySQLBalls (with a side of greens)” detailed the beginnings of MySQL, the MySQL acquisition history, described the state of current MySQL versions/variants/forks, storage engines, related vendors, NoSQL and much more.
A video of the presentations is available on YouTube at http://www.youtube.com/watch?v=9mKwkbaB5X8&feature=youtu.be
What’s New For SQL Optimization In DB2 9 And DB2 10 For z/OSSurekha Parekh
Abstract:
Reducing the total cost of ownership is everyone’s challenge, and it’s one of the key benefits of query optimization. Since its initial inception in DB2® for z/OS®, the cost-based Optimizer has continually evolved to deliver expert-based query and workload analysis and many other performance-enhancing functions. Based on the latest use by customers, the Optimizer delivers even more in DB2 10. This session will show you how the Optimizer in DB2 10 for z/OS can help reduce your total cost of ownership. We’ll discuss incremental query optimization enhancements available with the upcoming release of DB2 10 that build on DB2 9 enhancements, such as global query optimization. This session will cover the insight discovered in early usage, provide the reason for each enhancement and highlight the most important enhancements.
The History and Future of the MySQL ecosystemRonald Bradford
The history and future of the MySQL Ecosystem. This talk sub-titled “Spaghetti and MySQLBalls (with a side of greens)” detailed the beginnings of MySQL, the MySQL acquisition history, described the state of current MySQL versions/variants/forks, storage engines, related vendors, NoSQL and much more.
A video of the presentations is available on YouTube at http://www.youtube.com/watch?v=9mKwkbaB5X8&feature=youtu.be
"Disaster is inevitable" and "To move forward you must first backup" should be known to all software developers. This presentation will discuss all the options for your valuable data assets in MySQL, and highlight how to maintain site reliability of your data
Presentation given by Akmal Chaudhri (Hortonworks) to the BCS Data Management Specialist Group on 24th October 2013.
The presentation provides a balanced view of the state of NoSQL technology and tools and options for selection on projects.
A video of the presentation is available on YouTube at https://www.youtube.com/watch?v=FYfJ8C_YcvI
Mysql User Camp : 20-June-14 : Mysql New features and NoSQL SupportMysql User Camp
This slide was presented at Mysql User Camp Event on 20-June-14 at Oracle bangalore. This presentation gives a good insight about New Features in Mysql 5.7 DMR 4 and Nosql Support in Mysql.
In this GeekOn with Ron session, Ron Oglesby invites Ed Lee of Tintri to go deep on storage including discussions on IOPS, rotating disk, SSD, RAID, hybrid arrays, and more.
CMPE 297 Lecture: Building Infrastructure Clouds with OpenStackJoe Arnold
Lecture for the San Jose State masters program on cloud computing. Topic focuses on using OpenStack to deploy infrastructure clouds with commodity hardware and open source software. Covers virtualization, networking, storage, deployment and operations.
MySQL for Oracle Developers and the companion MySQL for Oracle DBA's were two presentations for the 2006 MySQL Conference and Expo. These were specifically designed for Oracle resources to understand the usage, syntax and differences between MySQL and Oracle.
Some might think Docker is for developers only, but this is not really the case.Docker is here to stay and we will only see more of it in the future.
In this session learn what Docker is and how it works.This session will be covering core areas such as volumes, but also stepping it up to a few tips and tricks to help you get the most out of your Docker environment.The session will dive into a few examples of how to create a database environment within just a few minutes - perfect for testing,development, and possibly even production systems.
More Related Content
Similar to [INSIGHT OUT 2011] A17 mastering my sql performance tuning(ronald bradford)
"Disaster is inevitable" and "To move forward you must first backup" should be known to all software developers. This presentation will discuss all the options for your valuable data assets in MySQL, and highlight how to maintain site reliability of your data
Presentation given by Akmal Chaudhri (Hortonworks) to the BCS Data Management Specialist Group on 24th October 2013.
The presentation provides a balanced view of the state of NoSQL technology and tools and options for selection on projects.
A video of the presentation is available on YouTube at https://www.youtube.com/watch?v=FYfJ8C_YcvI
Mysql User Camp : 20-June-14 : Mysql New features and NoSQL SupportMysql User Camp
This slide was presented at Mysql User Camp Event on 20-June-14 at Oracle bangalore. This presentation gives a good insight about New Features in Mysql 5.7 DMR 4 and Nosql Support in Mysql.
In this GeekOn with Ron session, Ron Oglesby invites Ed Lee of Tintri to go deep on storage including discussions on IOPS, rotating disk, SSD, RAID, hybrid arrays, and more.
CMPE 297 Lecture: Building Infrastructure Clouds with OpenStackJoe Arnold
Lecture for the San Jose State masters program on cloud computing. Topic focuses on using OpenStack to deploy infrastructure clouds with commodity hardware and open source software. Covers virtualization, networking, storage, deployment and operations.
MySQL for Oracle Developers and the companion MySQL for Oracle DBA's were two presentations for the 2006 MySQL Conference and Expo. These were specifically designed for Oracle resources to understand the usage, syntax and differences between MySQL and Oracle.
Some might think Docker is for developers only, but this is not really the case.Docker is here to stay and we will only see more of it in the future.
In this session learn what Docker is and how it works.This session will be covering core areas such as volumes, but also stepping it up to a few tips and tricks to help you get the most out of your Docker environment.The session will dive into a few examples of how to create a database environment within just a few minutes - perfect for testing,development, and possibly even production systems.
Machine Learning explained with Examples
Everybody is talking about machine learning. What is it actually and how can I use it?
In this presentation we will see some examples of solving real life use cases using machine learning. We will define Tasks and see how that task can be addressed using machine learning.
SQL Server 2017でLinuxに対応し、その延長線でDocker対応やKubernetesによる可用性構成が組めるようになりました。そしてリリースを間近に控えたSQL Server 2019ではKubernetesを活用したBig Data Cluster機能の提供が予定されており、コンテナの活用範囲はさらに広がっています。
本セッションではこれからSQL Serverコンテナに触れていくための基礎知識と実際に触れてみるための手順やサンプルをお届けします。
Dev Dives: Train smarter, not harder – active learning and UiPath LLMs for do...UiPathCommunity
💥 Speed, accuracy, and scaling – discover the superpowers of GenAI in action with UiPath Document Understanding and Communications Mining™:
See how to accelerate model training and optimize model performance with active learning
Learn about the latest enhancements to out-of-the-box document processing – with little to no training required
Get an exclusive demo of the new family of UiPath LLMs – GenAI models specialized for processing different types of documents and messages
This is a hands-on session specifically designed for automation developers and AI enthusiasts seeking to enhance their knowledge in leveraging the latest intelligent document processing capabilities offered by UiPath.
Speakers:
👨🏫 Andras Palfi, Senior Product Manager, UiPath
👩🏫 Lenka Dulovicova, Product Program Manager, UiPath
Removing Uninteresting Bytes in Software FuzzingAftab Hussain
Imagine a world where software fuzzing, the process of mutating bytes in test seeds to uncover hidden and erroneous program behaviors, becomes faster and more effective. A lot depends on the initial seeds, which can significantly dictate the trajectory of a fuzzing campaign, particularly in terms of how long it takes to uncover interesting behaviour in your code. We introduce DIAR, a technique designed to speedup fuzzing campaigns by pinpointing and eliminating those uninteresting bytes in the seeds. Picture this: instead of wasting valuable resources on meaningless mutations in large, bloated seeds, DIAR removes the unnecessary bytes, streamlining the entire process.
In this work, we equipped AFL, a popular fuzzer, with DIAR and examined two critical Linux libraries -- Libxml's xmllint, a tool for parsing xml documents, and Binutil's readelf, an essential debugging and security analysis command-line tool used to display detailed information about ELF (Executable and Linkable Format). Our preliminary results show that AFL+DIAR does not only discover new paths more quickly but also achieves higher coverage overall. This work thus showcases how starting with lean and optimized seeds can lead to faster, more comprehensive fuzzing campaigns -- and DIAR helps you find such seeds.
- These are slides of the talk given at IEEE International Conference on Software Testing Verification and Validation Workshop, ICSTW 2022.
Climate Impact of Software Testing at Nordic Testing DaysKari Kakkonen
My slides at Nordic Testing Days 6.6.2024
Climate impact / sustainability of software testing discussed on the talk. ICT and testing must carry their part of global responsibility to help with the climat warming. We can minimize the carbon footprint but we can also have a carbon handprint, a positive impact on the climate. Quality characteristics can be added with sustainability, and then measured continuously. Test environments can be used less, and in smaller scale and on demand. Test techniques can be used in optimizing or minimizing number of tests. Test automation can be used to speed up testing.
Epistemic Interaction - tuning interfaces to provide information for AI supportAlan Dix
Paper presented at SYNERGY workshop at AVI 2024, Genoa, Italy. 3rd June 2024
https://alandix.com/academic/papers/synergy2024-epistemic/
As machine learning integrates deeper into human-computer interactions, the concept of epistemic interaction emerges, aiming to refine these interactions to enhance system adaptability. This approach encourages minor, intentional adjustments in user behaviour to enrich the data available for system learning. This paper introduces epistemic interaction within the context of human-system communication, illustrating how deliberate interaction design can improve system understanding and adaptation. Through concrete examples, we demonstrate the potential of epistemic interaction to significantly advance human-computer interaction by leveraging intuitive human communication strategies to inform system design and functionality, offering a novel pathway for enriching user-system engagements.
Essentials of Automations: The Art of Triggers and Actions in FMESafe Software
In this second installment of our Essentials of Automations webinar series, we’ll explore the landscape of triggers and actions, guiding you through the nuances of authoring and adapting workspaces for seamless automations. Gain an understanding of the full spectrum of triggers and actions available in FME, empowering you to enhance your workspaces for efficient automation.
We’ll kick things off by showcasing the most commonly used event-based triggers, introducing you to various automation workflows like manual triggers, schedules, directory watchers, and more. Plus, see how these elements play out in real scenarios.
Whether you’re tweaking your current setup or building from the ground up, this session will arm you with the tools and insights needed to transform your FME usage into a powerhouse of productivity. Join us to discover effective strategies that simplify complex processes, enhancing your productivity and transforming your data management practices with FME. Let’s turn complexity into clarity and make your workspaces work wonders!
Le nuove frontiere dell'AI nell'RPA con UiPath Autopilot™UiPathCommunity
In questo evento online gratuito, organizzato dalla Community Italiana di UiPath, potrai esplorare le nuove funzionalità di Autopilot, il tool che integra l'Intelligenza Artificiale nei processi di sviluppo e utilizzo delle Automazioni.
📕 Vedremo insieme alcuni esempi dell'utilizzo di Autopilot in diversi tool della Suite UiPath:
Autopilot per Studio Web
Autopilot per Studio
Autopilot per Apps
Clipboard AI
GenAI applicata alla Document Understanding
👨🏫👨💻 Speakers:
Stefano Negro, UiPath MVPx3, RPA Tech Lead @ BSP Consultant
Flavio Martinelli, UiPath MVP 2023, Technical Account Manager @UiPath
Andrei Tasca, RPA Solutions Team Lead @NTT Data
DevOps and Testing slides at DASA ConnectKari Kakkonen
My and Rik Marselis slides at 30.5.2024 DASA Connect conference. We discuss about what is testing, then what is agile testing and finally what is Testing in DevOps. Finally we had lovely workshop with the participants trying to find out different ways to think about quality and testing in different parts of the DevOps infinity loop.
SAP Sapphire 2024 - ASUG301 building better apps with SAP Fiori.pdfPeter Spielvogel
Building better applications for business users with SAP Fiori.
• What is SAP Fiori and why it matters to you
• How a better user experience drives measurable business benefits
• How to get started with SAP Fiori today
• How SAP Fiori elements accelerates application development
• How SAP Build Code includes SAP Fiori tools and other generative artificial intelligence capabilities
• How SAP Fiori paves the way for using AI in SAP apps
Accelerate your Kubernetes clusters with Varnish CachingThijs Feryn
A presentation about the usage and availability of Varnish on Kubernetes. This talk explores the capabilities of Varnish caching and shows how to use the Varnish Helm chart to deploy it to Kubernetes.
This presentation was delivered at K8SUG Singapore. See https://feryn.eu/presentations/accelerate-your-kubernetes-clusters-with-varnish-caching-k8sug-singapore-28-2024 for more details.
Pushing the limits of ePRTC: 100ns holdover for 100 daysAdtran
At WSTS 2024, Alon Stern explored the topic of parametric holdover and explained how recent research findings can be implemented in real-world PNT networks to achieve 100 nanoseconds of accuracy for up to 100 days.
GraphRAG is All You need? LLM & Knowledge GraphGuy Korland
Guy Korland, CEO and Co-founder of FalkorDB, will review two articles on the integration of language models with knowledge graphs.
1. Unifying Large Language Models and Knowledge Graphs: A Roadmap.
https://arxiv.org/abs/2306.08302
2. Microsoft Research's GraphRAG paper and a review paper on various uses of knowledge graphs:
https://www.microsoft.com/en-us/research/blog/graphrag-unlocking-llm-discovery-on-narrative-private-data/
Observability Concepts EVERY Developer Should Know -- DeveloperWeek Europe.pdfPaige Cruz
Monitoring and observability aren’t traditionally found in software curriculums and many of us cobble this knowledge together from whatever vendor or ecosystem we were first introduced to and whatever is a part of your current company’s observability stack.
While the dev and ops silo continues to crumble….many organizations still relegate monitoring & observability as the purview of ops, infra and SRE teams. This is a mistake - achieving a highly observable system requires collaboration up and down the stack.
I, a former op, would like to extend an invitation to all application developers to join the observability party will share these foundational concepts to build on:
The Art of the Pitch: WordPress Relationships and SalesLaura Byrne
Clients don’t know what they don’t know. What web solutions are right for them? How does WordPress come into the picture? How do you make sure you understand scope and timeline? What do you do if sometime changes?
All these questions and more will be explored as we talk about matching clients’ needs with what your agency offers without pulling teeth or pulling your hair out. Practical tips, and strategies for successful relationship building that leads to closing the deal.
The Art of the Pitch: WordPress Relationships and Sales
[INSIGHT OUT 2011] A17 mastering my sql performance tuning(ronald bradford)
1. Title
EffectiveMySQL.com - Its all about Performance and Scalability
Wednesday, October 19, 2011
2. Title
Mastering MySQL
Performance Tuning
Ronald Bradford
http://ronaldbradford.com
Insight Out DB Showcase
October 2011
EffectiveMySQL.com - Its all about Performance and Scalability
Wednesday, October 19, 2011
3. OBJECTIVE
Identify key MySQL instrumentation
Detail the MySQL terms to know and use
Provide references to further materials
EffectiveMySQL.com - Its all about Performance and Scalability
Wednesday, October 19, 2011
4. ABOUT AUTHOR
Ronald BRADFORD
12 years with MySQL / 22 years with RDBMS
Senior Consultant at MySQL Inc (06-08)
Consultant for Oracle Corporation (96-99)
7 years presenting MySQL content
All time top MySQL blogger
Available NOW
Published author for consulting
Oracle ACE Director
http://RonaldBradford.com
EffectiveMySQL.com - Its all about Performance and Scalability
Wednesday, October 19, 2011
5. MySQL
Instrumentation
EffectiveMySQL.com - Its all about Performance and Scalability
Wednesday, October 19, 2011
6. Key sources
Configuration
my.cnf (e.g. /etc/my.cnf, /etc/mysql/my.cnf)
SHOW [SESSION|GLOBAL] VARIABLES
INFORMATION_SCHEMA tables
Status
SHOW [SESSION|GLOBAL] STATUS
INFORMATION_SCHEMA tables
EffectiveMySQL.com - Its all about Performance and Scalability
Wednesday, October 19, 2011
7. STATUS
SHOW STATUS EXAMPLE
INFORMATION_SCHEMA.STATUS Example
EffectiveMySQL.com - Its all about Performance and Scalability
Wednesday, October 19, 2011
8. Key Sources
Running Threads
SHOW FULL PROCESSLIST
INFORMATION_SCHEMA.PROCESSLIST
Storage Engines
SHOW ENGINE INNODB STATUS
Performance Schema
PERFORMANCE_SCHEMA
EffectiveMySQL.com - Its all about Performance and Scalability
Wednesday, October 19, 2011
9. PROCESSLIST
PROCESSLIST EXAMPLE
INFORMATION_SCHEMA.PROCESSLIST Example
EffectiveMySQL.com - Its all about Performance and Scalability
Wednesday, October 19, 2011
10. KEY areas
System performance
SQL performance
EffectiveMySQL.com - Its all about Performance and Scalability
Wednesday, October 19, 2011
11. Know your system
bottleneck
EffectiveMySQL.com - Its all about Performance and Scalability
Wednesday, October 19, 2011
12. BOTTLENECK
Memory
Disk
CPU
Network
EffectiveMySQL.com - Its all about Performance and Scalability
Wednesday, October 19, 2011
13. MEMORY
Basic configuration (Global use)
Basic configuration (Thread use)
Memory Tables
Thread Temporary tables
http://dev.mysql.com/doc/refman/5.5/en/memory-use.html
EffectiveMySQL.com - Its all about Performance and Scalability
Wednesday, October 19, 2011
14. Memory
Global Buffer configuration
innodb_buffer_pool_size
key_buffer_size
query_cache_size
EffectiveMySQL.com - Its all about Performance and Scalability
Wednesday, October 19, 2011
15. InnoDB Size
EXAMPLE
innodb_buffer_pool_size
Was 1 GB, should be 300M+
AWS small instance with 1.7G RAM
mysql> source sql/innodb_size.sql
+-------------------+----------+---------+----------+
| title | total_mb | data_mb | index_mb |
+-------------------+----------+---------+----------+
| Total InnoDB Size | 278 | 171 | 107 |
+-------------------+----------+---------+----------+
EffectiveMySQL.com - Its all about Performance and Scalability
Wednesday, October 19, 2011
16. InnoDB Size
EXAMPLE
innodb_buffer_pool_size
Was 1 GB, should be 300M+
AWS small instance with 1.7G RAM
mysql> source sql/innodb_size.sql
+-------------------+----------+---------+----------+
| title | total_mb | data_mb | index_mb |
+-------------------+----------+---------+----------+
| Total InnoDB Size | 278 | 171 | 107 |
+-------------------+----------+---------+----------+
Rule of 75-80% of RAM is WRONG!
EffectiveMySQL.com - Its all about Performance and Scalability
Wednesday, October 19, 2011
17. MyISAM Size
EXAMPLE
key_buffer_size
For MyISAM Indexes ONLY
Was default in RDS, should be 700M+
Github
mysql> source sql/myisam_size.sql
+-------------------+----------+---------+----------+
| title | total_mb | data_mb | index_mb |
+-------------------+----------+---------+----------+
| Total MyISAM Size | 6140 | 5492 | 648 |
+-------------------+----------+---------+----------+
EffectiveMySQL.com - Its all about Performance and Scalability
Wednesday, October 19, 2011
18. MyISAM Size
EXAMPLE
key_buffer_size
For MyISAM Indexes ONLY
Was default in RDS, should be 700M+
Github
mysql> source sql/myisam_size.sql
+-------------------+----------+---------+----------+
| title | total_mb | data_mb | index_mb |
+-------------------+----------+---------+----------+
| Total MyISAM Size | 6140 | 5492 | 648 |
+-------------------+----------+---------+----------+
Needs 1M min for all InnoDB system
EffectiveMySQL.com - Its all about Performance and Scalability
Wednesday, October 19, 2011
19. memory
Thread buffer configuration
read_buffer_size
read_rnd_buffer_size
sort_buffer_size
join_buffer_size
EffectiveMySQL.com - Its all about Performance and Scalability
Wednesday, October 19, 2011
20. memory
In Memory Tables
max_heap_table_size
Internal Temporary Tables
MIN(tmp_table_size,max_heap_table_size)
EffectiveMySQL.com - Its all about Performance and Scalability
Wednesday, October 19, 2011
21. Memory
mysqld memory
Unbounded
Linux process list (ps)
$ $ ps -eopid,fname,vsz,rss,user,command | grep -e "RSS" -e "mysql"
PID COMMAND VSZ RSS USER COMMAND
13628 grep 3352 820 ubuntu grep -e RSS -e mysql
28082 mysqld 631076 405660 mysql /usr/sbin/mysqld
$ ps -eopid,fname,vsz,rss,user,command | grep " mysqld " | grep -v grep
| awk '{print $3,$4}'
631076 405660
http://ronaldbradford.com/blog/are-you-monitoring-rss-vsz-2009-03-08/
EffectiveMySQL.com - Its all about Performance and Scalability
Wednesday, October 19, 2011
22. MEMORY
PROCESSLIST
Copying to tmp table
EffectiveMySQL.com - Its all about Performance and Scalability
Wednesday, October 19, 2011
23. Disk
fsync configuration
flush_log_at_trx_commit
sync_binlog
innodb_file_per_table
EffectiveMySQL.com - Its all about Performance and Scalability
Wednesday, October 19, 2011
24. MySQL DISK
Status Variables
mysql> show global status like 'innodb%write%';
+-----------------------------------+-----------+ Volumes
| Innodb_buffer_pool_write_requests | 821053284 |
| Innodb_data_pending_writes | 0 |
| Innodb_data_writes | 198400090 |
| Innodb_dblwr_writes | 547847 |
| Innodb_log_write_requests | 64860531 |
| Innodb_log_writes | 188609653 |
| Innodb_os_log_pending_writes | 0 |
+-----------------------------------+-----------+
mysql> show global status like '%sync%';
+------------------------------+---------+ True Costs
| Innodb_data_fsyncs | 6835646 |
| Innodb_data_pending_fsyncs | 0 |
| Innodb_os_log_fsyncs | 5681432 |
| Innodb_os_log_pending_fsyncs | 0 |
+------------------------------+---------+
mysql> show global status like 'created_tmp_disk_tables';
+-------------------------+-------+
| Created_tmp_disk_tables | 87 |
+-------------------------+-------+
EffectiveMySQL.com - Its all about Performance and Scalability
Wednesday, October 19, 2011
25. CPU
Query sorting (ORDER BY/GROUP BY)
PROCESSLIST
Sorting result
EXPLAIN
Using Filesort
EffectiveMySQL.com - Its all about Performance and Scalability
Wednesday, October 19, 2011
26. NETWORK
STATUS
Bytes_sent
Bytes_received
PROCESSLIST
Sending data
EffectiveMySQL.com - Its all about Performance and Scalability
Wednesday, October 19, 2011
27. SQL
EffectiveMySQL.com - Its all about Performance and Scalability
Wednesday, October 19, 2011
28. SQL performance
Throughput
Scalability is about increasing
throughout
Latency
Performance is about improving
latency
EffectiveMySQL.com - Its all about Performance and Scalability
Wednesday, October 19, 2011
29. THROUgHPUT
Status
Performance Schema
TCP/IP
EffectiveMySQL.com - Its all about Performance and Scalability
Wednesday, October 19, 2011
30. MySQL STATUS
EXAMPLE
$ status_now.sh
--------------------------+------------+
| Variable_name | Value |
+--------------------------+------------+
| Bytes_received | 142721 |
| Bytes_sent | 85170 | Temporary disk table
| Com_admin_commands | 160 | writes per second
| Com_delete | 4 |
| Com_insert | 12 |
| Com_select | 331 |
| Com_show_status | 1 |
| Com_update | 5 |
| Created_tmp_disk_tables | 52 |
| Created_tmp_tables | 53 |
...
| Qcache_inserts | 331 |
| Qcache_hits | 382 |
| Qcache_lowmem_prunes | 319 |
| Qcache_free_memory | -8600 |
...
| Uptime | 1 |
+--------------------------+------------+
https://github.com/ronaldbradford/EffectiveMySQL
EffectiveMySQL.com - Its all about Performance and Scalability
Wednesday, October 19, 2011
31. MySQL STATUS
EXAMPLE
$ status_now.sh What is happening this second?
--------------------------+------------+
| Variable_name | Value |
+--------------------------+------------+
| Bytes_received | 142721 |
| Bytes_sent | 85170 | Temporary disk table
| Com_admin_commands | 160 | writes per second
| Com_delete | 4 |
| Com_insert | 12 |
| Com_select | 331 |
| Com_show_status | 1 |
| Com_update | 5 |
| Created_tmp_disk_tables | 52 |
| Created_tmp_tables | 53 |
...
| Qcache_inserts | 331 |
| Qcache_hits | 382 |
| Qcache_lowmem_prunes | 319 |
| Qcache_free_memory | -8600 |
...
| Uptime | 1 |
+--------------------------+------------+
https://github.com/ronaldbradford/EffectiveMySQL
EffectiveMySQL.com - Its all about Performance and Scalability
Wednesday, October 19, 2011
32. TCP/IP
TCP/IP Example
EffectiveMySQL.com - Its all about Performance and Scalability
Wednesday, October 19, 2011
33. Latency
EXPLAIN
SHOW CREATE TABLE
SHOW INDEXES
EffectiveMySQL.com - Its all about Performance and Scalability
Wednesday, October 19, 2011
34. EXPLAin
EXPLAIN Example
EffectiveMySQL.com - Its all about Performance and Scalability
Wednesday, October 19, 2011
35. LATENCY
Optimizer Trace (Since 5.6.3)
Shows all optimizer actions
Rows statistics
Tree pruning
EffectiveMySQL.com - Its all about Performance and Scalability
Wednesday, October 19, 2011
36. OPTIMIZER TRACE
Optimizer Trace Example
EffectiveMySQL.com - Its all about Performance and Scalability
Wednesday, October 19, 2011
37. latency
performance_schema
Introduced in 5.5
Much improved 5.6.3
EffectiveMySQL.com - Its all about Performance and Scalability
Wednesday, October 19, 2011
38. Performance schema
Performance Schema example
EffectiveMySQL.com - Its all about Performance and Scalability
Wednesday, October 19, 2011
39. throughput
Repeating queries
Redundant queries
Unnecessary complex queries
EffectiveMySQL.com - Its all about Performance and Scalability
Wednesday, October 19, 2011
40. throughput
MySQL Query Cache
Great for high read
Poor for read/write
EffectiveMySQL.com - Its all about Performance and Scalability
Wednesday, October 19, 2011
41. The art of doing more
starts with doing less
EffectiveMySQL.com - Its all about Performance and Scalability
Wednesday, October 19, 2011
42. MYSQL STATUS
EXAMPLE
====================================================================================================
Uptime: 12 hours 17 mins Snapshot Period 1: 1 minute interval
====================================================================================================
Variable Delta/Percentage Per Second Total
Why are you doing crazy
====================================================================================================
Statement Activity
things Mr Framework?
====================================================================================================
SELECT: 16,042 267.37 8,177,050 (46.03%)
INSERT: 5,838 97.30 1,826,616 (10.28%)
UPDATE: 1,109 18.48 738,546 (4.16%)
DELETE: 2,018 33.63 1,374,983 (7.74%)
REPLACE: 0 0.00 0 (0.00%)
INSERT ... SELECT: 0 0.00 27 (0.00%)
REPLACE ... SELECT: 0 0.00 0 (0.00%)
Multi UPDATE: 0 0.00 0 (0.00%)
Multi DELETE: 0 0.00 0 (0.00%)
COMMIT: 5,708 95.13 2,161,232 (12.17%)
ROLLBACK: 5,746 95.77 3,485,828 (19.62%)
EffectiveMySQL.com - Its all about Performance and Scalability
Wednesday, October 19, 2011
43. Row Processing
EXAMPLE
SELECT name FROM firms WHERE id=727;
SELECT name FROM firms WHERE id=758;
SELECT name FROM firms WHERE id=857;
SELECT name FROM firms WHERE id=740; SELECT id, name
SELECT name FROM firms WHERE id=849; FROM firms
SELECT name FROM firms WHERE id=839; WHERE id IN (723, 727, 740, 758, 812, 829, 839,
SELECT name FROM firms WHERE id=847; 847, 849, 857, 867, 868);
SELECT name FROM firms WHERE id=867;
SELECT name FROM firms WHERE id=829;
SELECT name FROM firms WHERE id=812;
SELECT name FROM firms WHERE id=868;
SELECT name FROM firms WHERE id=723;
http://ronaldbradford.com/blog/optimizing-sql-performance-the-art-of-elimination-2010-07-08/
http://ronaldbradford.com/blog/simple-lessons-in-improving-scalability-2011-02-16/
http://ronaldbradford.com/blog/the-rat-and-the-cat-2006-08-24/
EffectiveMySQL.com - Its all about Performance and Scalability
Wednesday, October 19, 2011
44. Row Processing
EXAMPLE
SELECT name FROM firms WHERE id=727; Classic N+1 problem
SELECT name FROM firms WHERE id=758;
SELECT name FROM firms WHERE id=857;
SELECT name FROM firms WHERE id=740; SELECT id, name
SELECT name FROM firms WHERE id=849; FROM firms
SELECT name FROM firms WHERE id=839; WHERE id IN (723, 727, 740, 758, 812, 829, 839,
SELECT name FROM firms WHERE id=847; 847, 849, 857, 867, 868);
SELECT name FROM firms WHERE id=867;
SELECT name FROM firms WHERE id=829;
SELECT name FROM firms WHERE id=812;
SELECT name FROM firms WHERE id=868;
SELECT name FROM firms WHERE id=723;
http://ronaldbradford.com/blog/optimizing-sql-performance-the-art-of-elimination-2010-07-08/
http://ronaldbradford.com/blog/simple-lessons-in-improving-scalability-2011-02-16/
http://ronaldbradford.com/blog/the-rat-and-the-cat-2006-08-24/
EffectiveMySQL.com - Its all about Performance and Scalability
Wednesday, October 19, 2011
45. Row Processing
EXAMPLE
SET PROFILING=1;
SELECT … 4X longer processing for
SHOW PROFILES; every page load
+----------+------------+---------------------------------------------------------
| Query_ID | Duration | Query
+----------+------------+---------------------------------------------------------
| 1 | 0.00030400 | SELECT name FROM firms WHERE id=727
SELECT 'Sum Individual Queries' AS txt,SUM(DURATI
| 2 | 0.00014400 | SELECT name FROM firms WHERE id=758
INFORMATION_SCHEMA.PROFILING WHERE QUERY_ID BETWE
| 3 | 0.00014300 | SELECT name FROM firms WHERE id=857
UNION
| 4 | 0.00014000 | SELECT name FROM firms WHERE id=740Query',SUM(DURATION) FROM INFORM
SELECT 'Combined
| 5 | 0.00012300 | SELECT name FROM firms WHERE 13;
QUERY_ID = id=849
| 6 | 0.00012200 | SELECT name FROM firms WHERE id=839
+------------------------+------------+
| 7 | 0.00011600 | SELECT name FROM firms WHERE id=847
| txt | total_time |
| 8 | 0.00014300 | SELECT name FROM firms WHERE id=867
+------------------------+------------+
| 9 | 0.00013900 | SELECT name FROM firms WHERE id=829Queries |
| Sum Individual 0.001311 |
| 10 | 0.00014000 | SELECT name FROM firms WHERE Query
| Combined id=812 | 0.000311 |
| 11 | 0.00012800 | SELECT name FROM firms WHERE id=868
+------------------------+------------+
| 12 | 0.00011700 | SELECT name FROM firms WHERE id=723
| 13 | 0.00031100 | SELECT id, name FROM firms WHERE id IN (723 ...
+----------+------------+---------------------------------------------------------
EffectiveMySQL.com - Its all about Performance and Scalability
Wednesday, October 19, 2011
46. Row Processing
EXAMPLE
SET PROFILING=1;
SELECT … 4X longer processing for
SHOW PROFILES; every page load
+----------+------------+---------------------------------------------------------
| Query_ID | Duration | Query
+----------+------------+---------------------------------------------------------
| 1 | 0.00030400 | SELECT name FROM firms WHERE id=727
SELECT 'Sum Individual Queries' AS txt,SUM(DURATI
| 2 | 0.00014400 | SELECT name FROM firms WHERE id=758
INFORMATION_SCHEMA.PROFILING WHERE QUERY_ID BETWE
| 3 | 0.00014300 | SELECT name FROM firms WHERE id=857
UNION
| 4 | 0.00014000 | SELECT name FROM firms WHERE id=740Query',SUM(DURATION) FROM INFORM
SELECT 'Combined
| 5 | 0.00012300 | SELECT name FROM firms WHERE 13;
QUERY_ID = id=849
| 6 | 0.00012200 | SELECT name FROM firms WHERE id=839
+------------------------+------------+
| 7 | 0.00011600 | SELECT name FROM firms WHERE id=847
| txt | total_time |
| 8 | 0.00014300 | SELECT name FROM firms WHERE id=867
+------------------------+------------+
| 9 | 0.00013900 | SELECT name FROM firms WHERE id=829Queries |
| Sum Individual 0.001311 |
| 10 | 0.00014000 | SELECT name FROM firms WHERE Query
| Combined id=812 | 0.000311 |
| 11 | 0.00012800 | SELECT name FROM firms WHERE id=868
+------------------------+------------+
| 12 | 0.00011700 | SELECT name FROM firms WHERE id=723
| 13 | 0.00031100 | SELECT id, name FROM firms WHERE id IN (723 ...
+----------+------------+---------------------------------------------------------
Instant DB Scalability
EffectiveMySQL.com - Its all about Performance and Scalability
Wednesday, October 19, 2011
47. resources
Many principles are straight forward
for experienced Oracle resoures
Open Source projects
Less skilled workforce
EffectiveMySQL.com - Its all about Performance and Scalability
Wednesday, October 19, 2011
48. Architecture
EffectiveMySQL.com - Its all about Performance and Scalability
Wednesday, October 19, 2011
49. ARCHITECTure
Storage Engines
Reducing SQL
Monitoring
Replication
EffectiveMySQL.com - Its all about Performance and Scalability
Wednesday, October 19, 2011
50. replication
Weakest Link
EffectiveMySQL.com - Its all about Performance and Scalability
Wednesday, October 19, 2011
51. conclusion
MySQL is a relational database
Internals are very different
Instrumentation is improving in new
versions 5.5 GA 5.6 DMR
Planet MySQL http://planet.mysql.com
EffectiveMySQL.com - Its all about Performance and Scalability
Wednesday, October 19, 2011
52. Available NOW
http://effectivemysql.com/book/optimizing-sql-statements/
EffectiveMySQL.com - Its all about Performance and Scalability
Wednesday, October 19, 2011
53. Ronald Bradford
http://effectiveMySQL.com
EffectiveMySQL.com - Its all about Performance and Scalability
Wednesday, October 19, 2011