MySQL прочно удерживает второе по популярности место после Oracle в рейтинге DB-engines: https://db-engines.com/en/ranking_trend Репликация, табличные движки и поддержка NoSQL не дают MySQL сдавать позиции с 2012 года: года основания рейтинга. Что особенного в этих фичах? Что нужно знать, чтобы использовать их на полную мощность?
Я расскажу про дизайн. Именно он отвечает за то, чтобы ваше приложение не достигло потолка производительности. Понимание архитектуры поможет при проектирование нового приложения, которое впоследствии будет легко масштабироваться.
Доклад рассчитан для начинающих пользователей MySQL. Однако поможет освежить свои знания и более опытным.
Slides of the talk held at JEEConf, Kiev and jPrime, Sofia. A personal view on the classic topics from the Uncle Bob's Clean Code bible, with some personal additions and tips&tricks. This topic actually represents the core of the training sessions that I provide as an independent trainer (www.victorrentea.ro)
A jobs queue for processing tasks asynchronouslyCamptocamp
This talk is about the "Connector" [1] addon, but focused on the Jobs Queue, which can be used independently of any "connection". We will show, with examples, how we can use this module to delay intensive tasks which would block the users if they were executed synchronously. We'll also see how we can optimize the workload of the jobs using different Job Channels.
[1] http://odoo-connector.com
Slides of the talk held at JEEConf, Kiev and jPrime, Sofia. A personal view on the classic topics from the Uncle Bob's Clean Code bible, with some personal additions and tips&tricks. This topic actually represents the core of the training sessions that I provide as an independent trainer (www.victorrentea.ro)
A jobs queue for processing tasks asynchronouslyCamptocamp
This talk is about the "Connector" [1] addon, but focused on the Jobs Queue, which can be used independently of any "connection". We will show, with examples, how we can use this module to delay intensive tasks which would block the users if they were executed synchronously. We'll also see how we can optimize the workload of the jobs using different Job Channels.
[1] http://odoo-connector.com
(Video and code at https://fsharpforfunandprofit.com/pipeline/)
Passing data through a pipeline of transformations is an alternative approach to classic OOP. The LINQ methods in .NET are designed around this, but the pipeline approach can be used for so much more than manipulating collections.
In this talk, I'll look at pipeline-oriented programming and how it relates to functional programming, the open-closed principle, unit testing, the onion architecture, and more. I'll finish up by showing how you can build a complete web app using only this approach.
(video and more at http://fsharpforfunandprofit.com/fppatterns)
In object-oriented development, we are all familiar with design patterns such as the Strategy pattern and Decorator pattern, and design principles such as SOLID. The functional programming community has design patterns and principles as well. This talk will provide an overview of some of these patterns (such as currying, monads), and present some demonstrations of FP design in practice. We'll also look at some of the ways you can use these patterns as part of a domain driven design process, with some simple real world examples in F#. No jargon, no maths, and no prior F# experience necessary.
At first glance, writing concurrent programs in Java seems like a straight-forward task. But the devil is in the detail. Fortunately, these details are strictly regulated by the Java memory model which, roughly speaking, decides what values a program can observe for a field at any given time. Without respecting the memory model, a Java program might behave erratic and yield bugs that only occure on some hardware platforms. This presentation summarizes the guarantees that are given by Java's memory model and teaches how to properly use volatile and final fields or synchronized code blocks. Instead of discussing the model in terms of memory model formalisms, this presentation builds on easy-to follow Java code examples.
In Odoo 13 partner creation is 7X faster than Odoo 12. In Odoo 13 modify sales order is 11X faster than Odoo 12. In Odoo 13 create and Post invoice speed is 3X faster than Odoo 12.
In this blog, you are going to discuss the “Comparison between Odoo 12 and Odoo 13”.
Composition is a fundamental principle of functional programming, but how is it different from an object-oriented approach, and how do you use it in practice?
In this talk for beginners, we'll start by going over the basic concepts of functional programming, and then look at some different ways that composition can be used to build large things from small things.
After that, we'll see how composition is used in practice, beginning with a simple FizzBuzz example, and ending with a complete (object-free!) web application.
Let's get into several common types of queries that developers struggle with, showing SQL solutions, and then analyze them for optimal efficiency. I'll cover Exclusion Join, Random Selection, Greatest-Per-Group, Dynamic Pivot, and Relational Division.
MySQL exposes a collection of tunable parameters and indicators that is frankly intimidating. But a poorly tuned MySQL server is a bottleneck for your PHP application scalability. This session shows how to do InnoDB tuning and read the InnoDB status report in MySQL 5.5.
ORM(Object Relational Mapping) is a concept or technique which acts as a bridge between your programming language and your database. The Object Relational Mapping helps to execute SQL queries without writing them explicitly. Once the ORM is configured in an application, the user can use the OOP concepts like classes and objects to interact with the database.
The Proxy Fairy, and The Magic of Spring FrameworkVictor Rentea
You can only claim you know Spring if you fully understand the Proxy design pattern, and how the framework uses it to do its magic. Join this live-coding session to explore 6 ways of intercepting method calls that you can use to cast your own spells and dramatically simplify your codebase.
Grab a strong coffee and prepare yourself for a whirlwind of live-coding, interwoven with deep theoretical concepts and implementation details that you have to master if you are using the Spring Framework. During this session, Victor will share one of the best parts of his Design Patterns training, applied to Spring. You'll hear about the Decorator pattern plus 2 ways to wire it with Spring, bare-hands interface proxies, concrete classes proxies, @Aspect applied to custom annotations, plus some of the most common standard off-the-shelf Spring aspects. Come and learn from a hands-on practitioner real-world best practices of using Aspects, design hints, under-the-hood implementation details, debugging tips, performance impact of aspects, all in an interactive, entertaining and extremely dynamic session.
- Talk held at JPoint 2019, Moscow
When does InnoDB lock a row? Multiple rows? Why would it lock a gap? How do transactions affect these scenarios? Locking is one of the more opaque features of MySQL, but it’s very important for both developers and DBA’s to understand if they want their applications to work with high performance and concurrency. This is a creative presentation to illustrate the scenarios for locking in InnoDB and make these scenarios easier to visualize. I'll cover: key locks, table locks, gap locks, shared locks, exclusive locks, intention locks, insert locks, auto-inc locks, and also conditions for deadlocks.
Real Browser Check Scripting Guide - Rigor MonitoringAnthony Ferrari
This resource contains best practices, common conventions, and helpful tips for utilizing multi-step Real Browser Checks in
Rigor Monitoring. Testing mission critical user flows on your site to ensure optimal user experience is a necessity; use this
guide to assist with creating and maintaining these scripts.
Transparent sharding with Spider: what's new and getting startedMariaDB plc
OpenWorks 2019 Session
MariaDB Server 10.3 introduced transparent, built-in sharding with the Spider storage engine to scale out reads, writes and storage. MariaDB Server 10.4 will include a number of improvements, including DDL pushdown. In this session, Ralf Gebhardt and Kentoku Shiba of MariaDB show how to set up a sharded MariaDB cluster and scale out on demand, as well explore as best practices for high availability and consistency in a sharded deployment.
SQL-ник DevDay. Рубцов. Новое в Percona Server и MariaDB в сравнении с MySQL 5.5DevDay
Григорий Рубцов — руководитель проектов SQLinfo.ru (http://sqlinfo.ru/) и Webew.ru (http://webew.ru/), автор онлайн-курса по MySQL (http://sqlinfo.ru/classes/) и спикер конференции РИТ++.
Новое в Percona Server и MariaDB в сравнении с MySQL 5.5
Обзор возможностей:
— новое для разработчика;
— новое для администратора;
— улучшения производительности;
— миграция и вопросы совместимости.
Технические детали:
— хранилище XtraDB;
— Percona Tools;
— алгоритмы оптимизации подзапросов в MariaDB.
(Video and code at https://fsharpforfunandprofit.com/pipeline/)
Passing data through a pipeline of transformations is an alternative approach to classic OOP. The LINQ methods in .NET are designed around this, but the pipeline approach can be used for so much more than manipulating collections.
In this talk, I'll look at pipeline-oriented programming and how it relates to functional programming, the open-closed principle, unit testing, the onion architecture, and more. I'll finish up by showing how you can build a complete web app using only this approach.
(video and more at http://fsharpforfunandprofit.com/fppatterns)
In object-oriented development, we are all familiar with design patterns such as the Strategy pattern and Decorator pattern, and design principles such as SOLID. The functional programming community has design patterns and principles as well. This talk will provide an overview of some of these patterns (such as currying, monads), and present some demonstrations of FP design in practice. We'll also look at some of the ways you can use these patterns as part of a domain driven design process, with some simple real world examples in F#. No jargon, no maths, and no prior F# experience necessary.
At first glance, writing concurrent programs in Java seems like a straight-forward task. But the devil is in the detail. Fortunately, these details are strictly regulated by the Java memory model which, roughly speaking, decides what values a program can observe for a field at any given time. Without respecting the memory model, a Java program might behave erratic and yield bugs that only occure on some hardware platforms. This presentation summarizes the guarantees that are given by Java's memory model and teaches how to properly use volatile and final fields or synchronized code blocks. Instead of discussing the model in terms of memory model formalisms, this presentation builds on easy-to follow Java code examples.
In Odoo 13 partner creation is 7X faster than Odoo 12. In Odoo 13 modify sales order is 11X faster than Odoo 12. In Odoo 13 create and Post invoice speed is 3X faster than Odoo 12.
In this blog, you are going to discuss the “Comparison between Odoo 12 and Odoo 13”.
Composition is a fundamental principle of functional programming, but how is it different from an object-oriented approach, and how do you use it in practice?
In this talk for beginners, we'll start by going over the basic concepts of functional programming, and then look at some different ways that composition can be used to build large things from small things.
After that, we'll see how composition is used in practice, beginning with a simple FizzBuzz example, and ending with a complete (object-free!) web application.
Let's get into several common types of queries that developers struggle with, showing SQL solutions, and then analyze them for optimal efficiency. I'll cover Exclusion Join, Random Selection, Greatest-Per-Group, Dynamic Pivot, and Relational Division.
MySQL exposes a collection of tunable parameters and indicators that is frankly intimidating. But a poorly tuned MySQL server is a bottleneck for your PHP application scalability. This session shows how to do InnoDB tuning and read the InnoDB status report in MySQL 5.5.
ORM(Object Relational Mapping) is a concept or technique which acts as a bridge between your programming language and your database. The Object Relational Mapping helps to execute SQL queries without writing them explicitly. Once the ORM is configured in an application, the user can use the OOP concepts like classes and objects to interact with the database.
The Proxy Fairy, and The Magic of Spring FrameworkVictor Rentea
You can only claim you know Spring if you fully understand the Proxy design pattern, and how the framework uses it to do its magic. Join this live-coding session to explore 6 ways of intercepting method calls that you can use to cast your own spells and dramatically simplify your codebase.
Grab a strong coffee and prepare yourself for a whirlwind of live-coding, interwoven with deep theoretical concepts and implementation details that you have to master if you are using the Spring Framework. During this session, Victor will share one of the best parts of his Design Patterns training, applied to Spring. You'll hear about the Decorator pattern plus 2 ways to wire it with Spring, bare-hands interface proxies, concrete classes proxies, @Aspect applied to custom annotations, plus some of the most common standard off-the-shelf Spring aspects. Come and learn from a hands-on practitioner real-world best practices of using Aspects, design hints, under-the-hood implementation details, debugging tips, performance impact of aspects, all in an interactive, entertaining and extremely dynamic session.
- Talk held at JPoint 2019, Moscow
When does InnoDB lock a row? Multiple rows? Why would it lock a gap? How do transactions affect these scenarios? Locking is one of the more opaque features of MySQL, but it’s very important for both developers and DBA’s to understand if they want their applications to work with high performance and concurrency. This is a creative presentation to illustrate the scenarios for locking in InnoDB and make these scenarios easier to visualize. I'll cover: key locks, table locks, gap locks, shared locks, exclusive locks, intention locks, insert locks, auto-inc locks, and also conditions for deadlocks.
Real Browser Check Scripting Guide - Rigor MonitoringAnthony Ferrari
This resource contains best practices, common conventions, and helpful tips for utilizing multi-step Real Browser Checks in
Rigor Monitoring. Testing mission critical user flows on your site to ensure optimal user experience is a necessity; use this
guide to assist with creating and maintaining these scripts.
Transparent sharding with Spider: what's new and getting startedMariaDB plc
OpenWorks 2019 Session
MariaDB Server 10.3 introduced transparent, built-in sharding with the Spider storage engine to scale out reads, writes and storage. MariaDB Server 10.4 will include a number of improvements, including DDL pushdown. In this session, Ralf Gebhardt and Kentoku Shiba of MariaDB show how to set up a sharded MariaDB cluster and scale out on demand, as well explore as best practices for high availability and consistency in a sharded deployment.
SQL-ник DevDay. Рубцов. Новое в Percona Server и MariaDB в сравнении с MySQL 5.5DevDay
Григорий Рубцов — руководитель проектов SQLinfo.ru (http://sqlinfo.ru/) и Webew.ru (http://webew.ru/), автор онлайн-курса по MySQL (http://sqlinfo.ru/classes/) и спикер конференции РИТ++.
Новое в Percona Server и MariaDB в сравнении с MySQL 5.5
Обзор возможностей:
— новое для разработчика;
— новое для администратора;
— улучшения производительности;
— миграция и вопросы совместимости.
Технические детали:
— хранилище XtraDB;
— Percona Tools;
— алгоритмы оптимизации подзапросов в MariaDB.
Эффективная отладка репликации MySQL / Света Смирнова (Percona)Ontico
Репликация - одна из ключевых возможностей MySQL. Лёгкая в установке, позволяющая производить изменения и на мастере, и на слейве, что в свою очередь позволяет создавать сколь угодно сложные развёртывания. Репликация в MySQL асимметричная, допускающая некоторый уровень синхронизации при помощи semi-sync replication plugin. Начиная с версии 5.7 поддерживает одновременную репликацию с нескольких мастеров на один слейв.
Простота использования имеет свою обратную сторону: при проектировании репликации достаточно легко выбрать неправильное решение и познакомиться со всеми его подводными камнями.
В рамках этого доклада я расскажу об особенностях репликации MySQL, типичных ошибках и способах борьбы с ними. Мы затронем как проблемы, приводящие к появлению неожиданных данных и десинхронизации, так и производительность.
DevConf 2016
"Новые возможности MySQL 5.7", Дмитрий Ленев (Oracle)
MySQL 5.7 наиболее свежая стабильная ветка СУБД MySQL. Данный доклад
посвящен новым функциональным возможностям появившимся в этой версии.
В частности мы поговорим о:
- родной поддержке JSON данных и операций с ними
- генерируемых столбцах
- улучшениях в системе безопасности
- многочисленных измененениях в InnoDB
- изменениях в репликации, таких как поддержка multi-source репликации.
- многом другом
Кроме того будут освещены возможности связанные с новым X плагином, который
стал доступен с релизом версии 5.7.12 в апреле этого года.
Обсудим использование MySQL как Document Store, новый протокол и X DevApi
для коннекторов, новый клиент MySQL Shell.
Евгений Лазин. Неизменяемая структура данных HAMT для создания БД в памятиFProg
В данном докладе рассматривается пример использования персистентной структуры данных - функциональной версии HAMT, для создания main memory базы данных. Данная реализация HAMT располагается в shared memory и используется для хранения индексов.
Рассматриваются задачи, которые были быстро и эффективно решены благодаря использованию неизменяемых структур данных (управление изменениями, поддержка ACID-свойств), а также проблемы, возникшие из-за этого. Также, рассмотрен метод реализации персистентного графа, использующий изменяемые данные и позволяющий достичь большей производительности, по сравнению с аналогичной, неизменяемой структурой данных.
MyBatis и Hibernate на одном проекте. Как подружить?Alexey Zinoviev
Zinoviev Alexey presented this paper on CodeFest 2013, Novosibirsk.
Paper covers next topics: Hibernate, MyBatis, ORM, databases, SQL, JDBC, patterns, XML
Зиновьев Алексей Zinoviev Alexey выступил на Codefest 2013 с данным докладом.
Видео приглашение: http://youtu.be/8KObW8pZ9e0
Видео доклада: http://youtu.be/Tm5rl4ObWBA
Вебинар «Обмен данными между 1С: Конвертация данных 3.0»Анастасия Масенко
Тема : «Обмен данными между 1С: Конвертация данных 3.0»
Описание:
Обзор конфигурации Конвертация данных 3.0. Сравнение с конфигурацией «Конвертация данных 2.1». Области применения обоих конфигураций. Небольшой пример конвертации данных.
Ведущий: Шибаев Сергей (программист)
1. Программа вебинара:
Область применения конфигурации:
a. Перенос данных в 1С
b. Обмен данными между базами 1С
c. перенос остатков в 1С
d. Обмен между 1С и сторонними программами через XML в том числе обмен 1С с сайтом
2. Обзор технологии – XDTO-сериализация
3. Сравнение технологий Конвертация 2.1 и Конвертация 3.0
4. Перенос справочника 1С - простой пример обмена справочниками между системами.
Будем благодарны за ваши отзывы :)
Подходы и технологии, используемые в разработке iOS-клиента Viber, Кирилл Лаш...Yandex
Рассказ об основных принципах, которых придерживается Viber в длительной разработке приложения с большой кодовой базой — если разработкой занимается распределённая команда. Мы обсудим используемые технологии, библиотеки, работу с кодом и многое другое.
MySQL 2024: Зачем переходить на MySQL 8, если в 5.х всё устраивает?Sveta Smirnova
25 октябрая 2023 года Oracle прекратила активную поддержку MySQL 5.7.
Это значит, что стоит присмотреться к улучшениям в версии 8:
- Новому системному словарю
- Современному SQL
- Поддержке JSON, NoSQL, MySQL Shell, и возможности работать с MySQL как с MongoDB
- Улучшениям в оптимизаторе запросов и диагностике
Мой доклад для разработчиков приложений под MySQL. Я не буду рассказывать как конфигурировать сервер и сфокусируюсь на его использовании.
Database in Kubernetes: Diagnostics and MonitoringSveta Smirnova
Kubernetes is the new cool in 2023. Many database installations are on Kubernetes now. And this creates challenges for Support engineers because traditional monitoring and diagnostic tools work differently on bare hardware and Kubernetes. In this session, I will focus on differences in methods we use to collect metrics, describe challenges that Percona Support hits when working with database installations on Kubernetes, and discuss how we resolve them. This talk will cover all database technologies we support: MySQL, MongoDB, and PostgreSQL.
Presented at Percona Live 2023
MySQL Database Monitoring: Must, Good and Nice to HaveSveta Smirnova
It is very easy to find if a database installation is having issues. You only need to enable Operating System monitoring. A disk, memory, or CPU usage change will alert you about the problems. But they would not show *why* the trouble happens. You need the help of database-specific monitoring tools.
As a Support Engineer, I am always very upset when handling complaints about the database behavior lacking specific database monitoring data because I cannot help!
There are two reasons database and system administrators do not enable necessary instrumentation. The first is a natural or expected performance impact. Second is the lack of knowledge on what needs to be on to resolve a particular issue.
In this talk, I will cover both concerns.
I will show which monitoring instruments will give information on what causes disk, memory, or CPU problems.
I will teach you how to use them.
I will uncover which performance impact these instruments have.
I will use both MySQL command-line client and open-source graphical instrument Percona Monitoring and Management (PMM) for the examples.
MySQL Cookbook 4th edition was released this summer. We are the book's authors and will show you how to "cook" MySQL. We will show you a few tasks with different priorities, such as JSON in MySQL for those who need flexibility, modern SQL for analytics, and Group Replication for high availability. We will also show how to write programs using JavaScript and Python languages, X DevAPI, and MySQL Shell. We will touch on some of the exciting features of MySQL Spatial Indexes and Geographical Data, Using a Full-Text Search, and more. We're hoping this talk will be interesting for both developers and administrators of MySQL.
MySQL performance can be improved by tuning queries, server options, and hardware. Traditionally it was an area of responsibility for three different roles: Development, DBA, and System Administrators. Now DevOps handle these all. But there is a gap. Knowledge gained by MySQL DBAs after years or focusing on a single product is hard to gain when you focus on more than one. This is why I am doing this session. I will show a minimal but most effective set of options to improve MySQL performance. For illustrations, I will use real user stories gained from my Support experience and Percona Kubernetes operators for PXC and MySQL.
MySQL Test Framework для поддержки клиентов и верификации баговSveta Smirnova
Talk for TestDriven Conf: https://tdconf.ru/2022/abstracts/8763
MySQL Test Framework (MTR) — это фреймворк для регрессионных тестов MySQL. Тесты для него пишут разработчики MySQL и запускаются во время подготовки к новым релизам.
MTR можно использовать и по-другому. Я его использую, чтобы тестировать проблемы, о которых сообщают клиенты, и подтверждать сообщения об ошибках (bug reports) одновременно на нескольких версиях MySQL.
При помощи MTR можно:
* программировать сложные развёртывания;
* тестировать проблему на нескольких версиях MySQL/Percona/MariaDB-серверов при помощи одной команды;
* тестировать несколько одновременных соединений;
* проверять ошибки и возвращаемые значения;
* работать с результатами запросов, хранимыми процедурами и внешними командами.
Тест может быть запущен на любой машине с MySQL-, Percona- или MariaDB-сервером.
Я покажу, как я работаю с MySQL Test Framework, и надеюсь, что вы тоже полюбите этот инструмент.
These slides are for my talk at Percona Live 2022: https://sched.co/10KEo
MySQL Cookbook 4th edition (https://www.target.com/p/mysql-cookbook-4th-edition-by-sveta-smirnova-alkin-tezuysal-paperback/-/A-85851771) is planned to be released this spring. I am one of the authors of the book and will show you how to "cook" MySQL. I will show you a few tasks with different priorities, such as JSON in MySQL for those who need flexibility; modern SQL for analytics, and Group Replication for high availability. I will also show how to write programs using JavaScript and Python languages, X DevAPI, and MySQL Shell. I expect this talk will be interesting for MySQL application developers.
Introduction into MySQL Query Tuning for Dev[Op]sSveta Smirnova
Percona Live Online 2021 talk: https://www.percona.com/resources/videos/introduction-mysql-query-tuning-for-devops
In this talk I will show how to get started with MySQL Query Tuning. I will make a short introduction into physical table structure and demonstrate how it may influence query execution time.
Then we will discuss basic query tuning instruments and techniques, mainly EXPLAIN command with its latest variations. You will learn how to understand its output and how to rewrite queries or change table structure to achieve better performance.
Talk for the DevOps Pro Moscow 2021: https://www.devopspro.ru/Sveta-Smirnova/
Производительность MySQL можно улучшить при помощи оптимизации запросов, настроек MySQL сервера и железа. Традиционно эти задачи распределялись между тремя ролями: Разработчик, Администратор баз данных и Системный Администратор. Теперь же все эти задачи решает DevOps, что непросто для одного человека. В этом докладе я расскажу об основных оптимизациях, которые решают большинство проблем производительности MySQL. Для иллюстраций я буду использовать реальные пользовательские истории и Percona Kubernetes Operator.
MySQL performance can be improved by tuning queries, server options, and hardware. Traditionally it was an area of responsibility of three different roles: Development, DBA and System Administrators. Now DevOps handle these all. But there is a gap. Knowledge, gained by MySQL DBAs after years or focus on the single product is hard to gain when you focus on more than one. This is why I am doing this session. I will show minimal, but the most effective, set of options which will improve MySQL performance. For illustrations, I will use real user stories, gained by my Support experience, and Kubernetes operators, now available from all main MySQL eco-system vendors: Oracle, MariaDB, and Percona.
Presented at Open Source Summit Europe 2020: https://sched.co/eCGf
How to Avoid Pitfalls in Schema Upgrade with Percona XtraDB ClusterSveta Smirnova
Percona XtraDB Cluster (PXC) is a 100% synchronized cluster in regards to DML operations. It is ensured by the optimistic locking model and ability to rollback transaction which cannot be applied on all nodes. However, DDL operations are not transactional in MySQL. This adds complexity when you need to change the schema of the database.
Changes made by DDL may affect the results of the queries. Therefore all modifications must replicate on all nodes prior to the next data access. For operations that run momentarily, it can be easily achieved, but schema changes may take hours to apply. Therefore in addition to the safest synchronous blocking schema upgrade method: TOI, - PXC supports more relaxed, though not safe, method RSU.
RSU: Rolling Schema Upgrade is advertised to be non-blocking. But you still need to take care of updates, running while you are performing such an upgrade. Surprisingly, even updates on not related tables and schema can cause RSU operation to fail.
In this talk, I will uncover nuances of PXC schema upgrades and point to details you need to take special care about.
Further Information
Schema change is a frequent task, and many do not expect any surprises with it. However, the necessity to replay the changes to all synchronized nodes adds complexity. I made a webinar on a similar topic which was recorded and available for replay. Now I have found that I share a link to the webinar to my Support customers approximately once per week. Not having a good understanding of how schema change works in the cluster leads to lockups and operation failures. This talk will provide a checklist that will help to choose the best schema change method.
Presented at Percona Live Online: https://perconaliveonline2020.sched.com/event/ePm2/how-to-avoid-pitfalls-in-schema-upgrade-with-percona-xtradb-cluster
How to migrate from MySQL to MariaDB without tearsSveta Smirnova
Presented at MariaDB Server Fest 2020: https://mariadb.org/fest2020/migrate-mysql/
MariaDB is a drop-in replacement for MySQL. Initial migration is simple: start MariaDB over the old MySQL datadir.
Later your application may notice that some features work differently than with MySQL. These are MariaDB improvements, so this is good and, likely the reason you migrated.
In this session, I will focus on the differences affecting application performance and behavior. In particular, features sharing the same name, but working differently.
Modern solutions for modern database load: improvements in the latest MariaDB...Sveta Smirnova
Presented at MariaDB Server Fest 2020: https://mariadb.org/fest2020/improvements/
MariaDB is famous for working well in high-performance environments. But our view of what to call high-performance changes over time. Every year we get faster data transfer speed; more devices connected to the Internet; more users and, as a result, more data.
Challenges, which developers have to solve, are getting harder. This session shows what engineers do to keep the product up to date, focusing on MariaDB improvements that make it different from its predecessor, MySQL.
How Safe is Asynchronous Master-Master Setup?Sveta Smirnova
Presented at Percona MySQL Tech Day on September 10, 2020: https://www.percona.com/tech-days#mysql
It is common knowledge that built-in asynchronous active-active replication is not safe. I remember times when the official MySQL User Reference Manual stated that such an installation is not recommended for production use. Some experts repeat this claim even now.
While this statement is generally true, I worked with thousands of shops that successfully avoided asynchronous replication limitations in active-active setups.
In this talk, I will show how they did it, demonstrate situations when asynchronous source-source replication is the best possible high availability option and beats such solutions as Galera or InnoDB Clusters. I will also cover common mistakes, leading to disasters.
Современному хайлоду - современные решения: MySQL 8.0 и улучшения PerconaSveta Smirnova
MySQL всегда использовали под высокой нагрузкой. Недаром эта база была и остаётся самым популярным бэкэндом для web. Однако наши представления о хайлоде с каждым годом расширяются. Большая скорость передачи данных -> больше устройств с подключением к интернет -> больше пользователей -> больше данных.
Задачи, стоящие перед разработчиками MySQL, с каждым годом усложняются.
В этом докладе я расскажу как менялись сценарии использования MySQL за [почти] 25 лет её истории и что делали инженеры, чтобы MySQL оставалась актуальной. Мы затронем такие темы, как работа с большим количеством активных соединений и высокими объёмами данных. Я покажу насколько современные версии лучше справляются с возросшими нагрузками.
Я надеюсь, что после моего доклада те слушатели, которые используют старые версии, захотят обновиться и те, кто уже обновились, узнают как использовать современный MySQL на полную мощность.
Прочитана на конференции OST 2020: https://ostconf.com/materials/2857#2857
How to Avoid Pitfalls in Schema Upgrade with GaleraSveta Smirnova
Galera Cluster for MySQL is a 100% synchronized cluster in regards to data modification operations (DML). It is ensured by the optimistic locking model and ability to rollback a transaction, which cannot be applied on all nodes. However, schema changes (DDL operations) are not transactional in MySQL, which adds complexity when you need to perform an upgrade or change schema of the database.
Changes made by DDL may affect results of the queries. Therefore all modifications must replicate on all nodes prior next data access. For operations which run momentarily it can be easily achieved, but schema changes may take hours to apply. Therefore in addition to safest synchronous blocking schema upgrade method TOI Galera also supports more relaxed, thought not safe, method RSU.
In her talk Sveta will describe which pitfalls you can hit while performing the change using one or another method, why and how to avoid them.
Presented at MariaDB Day Brussels 0202 2020: https://mariadb.org/mariadb-day-brussels-0202-2020-provisional-schedule/
How Safe is Asynchronous Master-Master Setup?Sveta Smirnova
It is common knowledge that built-in asynchronous master-master (active-active) replication is not safe. I remember times when the official MySQL User Reference Manual stated that such an installation is not recommended for production use. Some experts repeat this claim even now.
While this statement is generally true, I worked with thousands of shops that successfully avoided asynchronous replication limitations in active-active setups.
In this talk, I will show how they did it, demonstrate situations when asynchronous master-master replication is the best possible high availability option and beats such solutions as Galera or InnoDB Clusters. I will also cover common mistakes, leading to disasters.
Presented in "MySQL, MariaDB and Friends devroom" at Fosdem in 2020: https://fosdem.org/2020/schedule/event/mysql_master_master/
Introduction to MySQL Query Tuning for Dev[Op]sSveta Smirnova
To get data, we query the database. MySQL does its best to return requested bytes as fast as possible. However, it needs human help to identify what is important and should be accessed in the first place.
Queries, written smartly, can significantly outperform automatically generated ones. Indexes and Optimizer statistics, not limited to the Histograms only, help to increase the speed of the query a lot.
In this session, I will demonstrate by examples of how MySQL query performance can be improved. I will focus on techniques, accessible by Developers and DevOps rather on those which are usually used by Database Administrators. In the end, I will present troubleshooting tools which will help you to identify why your queries do not perform. Then you could use the knowledge from the beginning of the session to improve them.
Billion Goods in Few Categories: How Histograms Save a Life?Sveta Smirnova
We store data with an intention to use it: search, retrieve, group, sort... To do it effectively the MySQL Optimizer uses index statistics when compiles the query execution plan. This approach works excellently unless your data distribution is not even.
Last year I worked on several tickets where data follow the same pattern: millions of popular products fit into a couple of categories and rest used the rest. We had a hard time to find a solution for retrieving goods fast. We offered workarounds for version 5.7. However new MariaDB and MySQL 8.0 feature: histograms, - would work better, cleaner and faster. The idea of the talk was born.
Of course, histograms are not a panacea and do not help in all situations.
I will discuss:
how index statistics physically stored by the storage engine
which data exchanged with the Optimizer
why it is not enough to make correct index choice
when histograms can help and when they cannot
differences between MySQL and MariaDB histograms
A Billion Goods in a Few Categories: When Optimizer Histograms Help and When ...Sveta Smirnova
Last year this session’s speaker worked on several cases where data followed the same pattern: millions of popular products fit into a couple of categories, and the rest uses the rest. Her team had a hard time finding a solution for retrieving goods quickly. MySQL 8.0 has a feature that resolves such issues: optimizer histograms, storing statistics of an exact number of values in each data bucket. In real life, histograms don’t help with all queries accessing nonuniform data. How you write a statement, the number of rows in the table, data distribution: All of these may affect the use of histograms. This presentation shows examples demonstrating how the optimizer works in each case, describes how to create histograms, and covers differences between MySQL and Oracle implementations.
A Billion Goods in a Few Categories: When Optimizer Histograms Help and When ...
Что нужно знать о трёх топовых фичах MySQL
1. Что нужно знать
о трёх топовых фичах MySQL
August, 22, 2019
Sveta Smirnova
2. ∙ Инженер тех. поддержки MySQL
∙
Автор
∙ MySQL Troubleshooting
∙
JSON UDF функции
∙ FILTER clause для MySQL
∙ Докладчик
∙
Percona Live, OOW, Fosdem,
DevConf, HighLoad...
Света Смирнова
2
6. Connectors: C, JDBC, ODBC, Python, ...
Connection Pool: Authentication, Caches
SQL interface
Parser
Optimizer
Caches and Buffers:
Global
Engine-specific
Storage engines: InnoDB, TokuDB, ...
File system: Data, Index, logs, other files
∙
mysqld и его файлы
∙ Коннекторы
∙ Оптимизатор
∙ Кэши
∙ Табличные движки
∙ Управление
Архитектура MySQL
6
7. ∙
Владеют данными
∙
Собственный формат индексов
∙
Собственные блокировки
∙
Собственная диагностика
∙ Собственные журналы
∙ CHECK TABLE
Табличные Движки
7
8. ∙
InnoDB
∙ Сначала пишет в redo log и buffer pool
∙ Асинхронно копирует в файлы таблиц
∙
Мы не можем скопировать только tablespaces
сразу после записи: новые данные будут
только в redo logs и buffer pool
Каждый Хранит Данные По-своему
8
9. ∙
InnoDB
∙
MyISAM, CSV, ...
∙ Сразу изменяет файлы данных
∙ Просто реализовать бинарный бэкап
∙
Изменения нельзя откатить
Каждый Хранит Данные По-своему
8
23. ∙ Системный tablespace
∙
InnoDB data dictionary
Метаданные
∙ Doublewrite buffer
Хранит страницу после удаления из Buffer Pool и до записи в нужное место
Для восстановления после крэша во время записи страницы
∙ Change buffer
Кэш изменений вторичных индексов
Если их нет в Buffer Pool
∙ Undo log (rollback segment)
Копии данных, изменённых активными транзакциями
Могут храниться отдельно в 5.6+
Структуры InnoDB
14
24. ∙ Системный tablespace
∙ Buffer pool
∙ В памяти
∙
Кэш данных и индексов
∙ Устаревшие данные удаляются с применением
LRU алгоритма
Структуры InnoDB
14
25. ∙ Системный tablespace
∙ Buffer pool
∙ Redo log
∙ Кодированные изменения страниц
∙
Записываются в циклической манере
∙
Незавершенные записи в файлы таблиц
проигрываются из журнала после крэша
Структуры InnoDB
14
26. ∙ Системный tablespace
∙ Buffer pool
∙ Redo log
∙
File-Per-Table Tablespaces
∙ Данные и индексы таблицы
∙ Поддерживают разные форматы
∙
Могут храниться на разных дисках
Структуры InnoDB
14
27. ∙ Больше потоков - больше работы может
быть выполнено одновременно
Конкуренция
15
28. ∙ Больше потоков - больше работы может
быть выполнено одновременно
∙
Поток InnoDB ̸= соединение
∙ Соединения могут бездействовать пока
InnoDB выполняет свою работу
∙ Если активных соединений (Running_threads)
больше, чем потоков InnoDB
Часть ждёт в очереди
Конкуренция
15
29. ∙ Больше потоков - больше работы может
быть выполнено одновременно
∙
Поток InnoDB ̸= соединение
∙
Ограничено количеством ядер CPU
Конкуренция
15
30. ∙ Больше потоков - больше работы может
быть выполнено одновременно
∙
Поток InnoDB ̸= соединение
∙
Ограничено количеством ядер CPU
∙ Слишком большое количество потоков
может привести к конфликтам
∙
Производительность уменьшится
∙ Сервер зависнет!
Конкуренция
15
31. ∙ Больше потоков - больше работы может
быть выполнено одновременно
∙
Поток InnoDB ̸= соединение
∙
Ограничено количеством ядер CPU
∙ Слишком большое количество потоков
может привести к конфликтам
∙ innodb_thread_concurrency
Конкуренция
15
32. 1 2 4 8 16 32 64 128 256
10
15
20
Number of threads
Transactionspersecond
Taken on 8-cores laptop
Неоправданно большое количество потоков
16
36. ∙ Обязательные
∙ С риском потери данных
∙ innodb_doublewrite
∙
innodb_flush_log_at_trx_commit
∙ innodb_flush_log_at_timeout
∙ Изменяйте только на репликах!
Настройка ввода-вывода для InnoDB
18
66. Master
Получает изменение
Передаёт движку →
Пишет в binary log
Синхронизируется →
Табличный Движок
Пишет в таблицу
← Возвращает контроль
← Синхронизируется
Логическая
33
80. ∙
Нужно указать
∙
Название binary log
∙
Позицию
∙
С точки зрения отладки
∙ Выполнение с указанной позиции
∙
Легко пропустить
Позиционная
36
81. ∙
Нужно указать
∙
Название binary log
∙
Позицию
∙
С точки зрения отладки
∙ Выполнение с указанной позиции
∙
Легко пропустить
∙ Легко переместить назад
Позиционная
36
82. ∙
Нужно указать
∙
Название binary log
∙
Позицию
∙
С точки зрения отладки
∙ Выполнение с указанной позиции
∙
Легко пропустить
∙ Легко переместить назад
∙ Все конфликты - ваши
Позиционная
36
83. ∙ У каждой транзакции свой номер: GTID
Global Transaction Identifiers (GTID)
37
84. ∙ У каждой транзакции свой номер: GTID
∙ Название binary log и позиция не нужны
∙ AUTO_POSITION=1
Global Transaction Identifiers (GTID)
37
85. ∙ У каждой транзакции свой номер: GTID
∙ Название binary log и позиция не нужны
∙ Сложно пропустить ошибочные записи
Global Transaction Identifiers (GTID)
37
86. ∙ У каждой транзакции свой номер: GTID
∙ Название binary log и позиция не нужны
∙ Сложно пропустить ошибочные записи
∙ Не все команды разрешены
∙ Транзакционные и нетранзакционные движки
∙ CREATE TABLE ... SELECT
∙ Временные таблицы
8.0.13+: разрешены при RBR
Global Transaction Identifiers (GTID)
37
88. ∙ Синхронизация binary log и таблицы
∙ SBR и transaction isolation levels
mysql> set transaction isolation level read committed;
Query OK, 0 rows affected (0,00 sec)
mysql> update t1 set f1=f1*2;
ERROR 1665 (HY000): Cannot execute statement: impossible to write to binary log since
BINLOG_FORMAT = STATEMENT and at least one table uses a storage engine limited to
row-based logging. InnoDB is limited to row-logging when transaction isolation level
is READ COMMITTED or READ UNCOMMITTED.
Табличные Движки и Репликация
38
89. ∙ Синхронизация binary log и таблицы
∙ SBR и transaction isolation levels
∙ RBR - независимый от движка формат
Табличные Движки и Репликация
38
90. ∙ Синхронизация binary log и таблицы
∙ SBR и transaction isolation levels
∙ RBR - независимый от движка формат
∙
GTIDs независимы от движка
Табличные Движки и Репликация
38
91. ∙ Синхронизация binary log и таблицы
∙ SBR и transaction isolation levels
∙ RBR - независимый от движка формат
∙
GTIDs независимы от движка
∙
У движка могут быть свои специфические
фичи для репликации
∙ Read free репликация в TokuDB
Табличные Движки и Репликация
38
95. ∙ Манипулируют документами JSON
∙ Тип данных JSON
∙ Оптимизированное хранилище
∙
Автоматическая валидация
Функции JSON
41
96. ∙ Манипулируют документами JSON
∙ Тип данных JSON
∙ Может работать со строками
∙ Медленно
∙ Автоматическая валидация не
поддерживается
Функции JSON
41
98. ∙ Доступ из MySQL Shell
∙ Поддерживает
∙ Python, JavaScript, C#, C++, Java
∙ Your driver
∙ X Plugin: асинхронный клиент
X Protocol
X DevAPi
∙ Данные хранятся в реляционном формате
MySQL как Document Store
43
99. ∙ Интерфейс к memcached
∙ Доступ ключ-значение
∙ Данные хранятся в InnoDB
∙ Могут быть кэшированы
∙
Кэш может быть настроен для высокой
производительности
∙ Умолчания: только прямой доступ, высокая
надёжности, фактически никакого кэша
Memcached API
44
100. ∙ Вебинары
Introduction to MySQL Troubleshooting
Storage engines troubleshooting
InnoDB Troubleshooting
MySQL Replication Troubleshooting
Дополнительная Информация
45
101. ∙ Мануалы
The InnoDB Storage Engine
Replication
JSON Functions
MySQL as a Document Store
InnoDB memcached Plugin
Дополнительная Информация
45