Showing entries 1 to 10 of 12
2 Older Entries »
Displaying posts with tag: Optimisation (reset)
Will IO Size Affect your RDS Performance?​

During our recent consulting with one of our client, We came across an interesting issue on RDS. The baseline is that “Low IO size on your RDS instance can affect your DB performance”.  Yes, It’s IO size, Not IOPS.

We had our production systems running on RDS MySQL with a single master, 3 replicas. All instances are of same type db.m4.4xlarge with same parameter group configuration and the disk size is 1.5 TB. According to the AWS user guide, each of these instances can support up to 4500 (sustained IOPS) guaranteed IOPS.

Find below the Write IOPS graph for all the instances.

It’s understood that Write IOPS / pattern on Master can vary when compared with Slave, due to a lot of factors like binlog row format, log writing etc. But it has to be almost similar for all the slaves given that it …

[Read more]
Common Table Expression (CTE) MySQL 8.0.

1.0. Introduction:

MySQL 8.0 was released with awesome features. One of its most prominent features is CTE (Common Table Expression).

The Common Table Expression can be used to construct complex queries in a more readable manner. In this blog, I have described how the CTE works with some useful examples.

1.1 What is CTE?

A Common Table Expression (CTE) is the result set of the query, which exists temporarily and uses only within the context of a larger query.

The CTE provides better readability and performance in comparison with a derived table.

In a normal query the temporary result set that exists only within the execution scope of a single SQL statement.

Example:

select …
[Read more]
Presentation : Evolution of DBA’s in the Cloud Era

Mydbops team has presented at 15th edition Open source India Conference happened at Bangalore on 12-10-2018. Manosh malai ( Senior Devops/ DB Consultant ) and Kabilesh P R ( Co-Founder Mydbops ) has made presentation on “Evolution of DBA in the Cloud Era“. They have shared the value addition that DBA’s can bring into any organisation who have adopted to cloud ( DBaaS ). They have shared a case study of their consulting experience too.

Partial (Optimised) JSON updates and Replication in MySQL 8.0

           MySQL is the most widely used  Relational Database Management System in the open source world. MySQL stepped into the NoSQL world by introducing the JSON Data Type in MySQL 5.7 release. In this blog post I am going to explain one of the major advantage of optimisation made in JSON Replication .

This was done from the MySQL 8.0.3 release.

What happened before 8.0.3 ?

Before MySQL 8.0.3, Whatever changes (Updates) made in JSON document, it will log as a full document in binary log & replicate the same into slave. The JSON data is stored as a blob internally. Below is an example of how it is logged as full document in binary log ?

Example –

Server version - 5.7.22-log MySQL Community Server (GPL)

My Binlog …
[Read more]
Invisible Indexes – MySQL 8.0

MySQL 8.0 has a rich set of features. One of the feature which interests DBA’s more is invisible index

What is an index in MySQL ?

  • The indexes are used to find rows with specific column values quickly. Without an index, MySQL must begin with the first row and then read through the entire table to find the relevant rows.

What is invisible index ?

  • The invisible index is ability to mark an index as unavailable for use by optimizer.
  • In MySQL 5.7 and other previous versions the indexes are visible by a default.
  • To control the index visibility for a new index ,use a  visible or invisible key words as a part of the index creation.

How to add a invisible index on existing table ?

Syntax :

[Read more]
JOIN Elimination: An Essential Optimiser Feature for Advanced SQL Usage

The SQL language has one great advantage over procedural, object oriented, and “ordinary” functional programming languages. The fact that it is truly declarative (i.e. a 4GL / fourth generation programming language) means that a sophisticated optimiser can easily transform one SQL expression into another, equivalent SQL expression, which might be faster to execute.

How does this work?

Expression Tree Equivalence

Here’s an introduction to equivalent expression trees from my SQL Masterclass: Let’s assume we want to evaluate the following expression:

A + (A - B)

Now in maths, it can be proven trivially that by the laws of associativity, the above expression …

[Read more]
Cost-based Optimization in MySQL 5.7

Optimiser is the brain of the RDBMS. Optimiser decides the right access method , algorithms , join order and right index to be used for better execution of the query. This blog is made to shed some lights on Cost based optimiser in MySQL 5.7. The cost or statistics are stored in the data dictionary .

What is cost-based optimization ?

  • The cost model is based on estimates of cost various operations occur during query execution.
  • The optimizer has a set of default “cost constants” it will make decision on execution plans.
  • In MySQL 5.7, the optimizer has addition a database of cost estimates to use during the execution plan.
  • These cost estimates are stored in server_cost & engine_cost tables in MySQL schema. For more details Cost Model

[Read more]
Optimising Web Servers

I was lucky enough to attend PyCon-AU recently and one talk in particular highlighted the process of web server optimisation.

Graham Dumpleton’s add-in talk Web Server Bottlenecks And Performance Tuning available on YouTube (with the majority of PyCon-AU talks)

The first big note at the beginning is that the majority of the delay in user’s perception of a website is caused by the browser rendering the page. Though not covered in the talk for those that haven’t used the tool YSlow (for Firefox and Chrome) or Google’s Developer Tools (ctrl-alt-I in Chrome), both tools will …

[Read more]
Database metics - thoughts and measurements


If I were to ask you 'what are the (database) metrics?', what do you think I'm asking? Thats an interesting question and something that requires some thought so lets handle this by actually looking at the following two alternative questions. 'What am I trying to archive [with database metrics]?' and 'how will I know when I have achieved it [by having database metrics]'?

Define the problem

What are we really doing
What are we trying to achieve?

  • Know how much capacity we have
  • Know that our databases are fast


How do we know when we have achieved it?

  • When we can forward plan upgrades when we are near a capacity limit
  • To be alerted of when things are not fast we can we investigate

So, what is capacity

Capacity is knowing how much extra we can do without making things 'slow'. Its a …

[Read more]
Formation Optimisation MySQL

Désolé, il ne reste plus de place pour cette matinée dédiée à l'optimisation des performances MySQL.

Date : 24 novembre 2009

Session 1 : 9h30-10h45

  • Architecture MySQL : Parsing, exécution, optimizer, query cache, binlog…etc
  • Architecture Innodb : Clustered index, bufferpool, hash index, insert buffer, locking model, MVCC, recovery log, checkpoint…etc. Comparaison avec les autres moteurs de stockage (PBXT, MySQL Cluster) et bases de données (PostgreSQL, Oracle ..).


Pause/Café : 10h45-11h00.

Session 2 : 11h00-12h30

  • Évolutions récentes : Google SMP patches,  XtraDB, Oracle innodb plugin 1.0.4
  • Apports de MySQL 5.4
  • Améliorations à venir :  Ahead flushing / Adaptive checkpoint,  …
[Read more]
Showing entries 1 to 10 of 12
2 Older Entries »