News

One thought about scaling applications

Shinguz - Thu, 2022-02-17 08:56

Are containers so popular because application developers do not know how to write multi-threaded applications well? With containers you can circumvent this problem a bit. You ramp up man single threaded applications in containers and thus get a multi-threaded behaviour.
Databases ARE already multi-threaded. So no need to containerize them.


Sharding do-it-yourself

Shinguz - Tue, 2022-02-15 12:18

As already mentioned earlier, we roughly have a hand full of customers which are playing with the though of sharding solutions. They typically have many different customers (clients, tenants) and the number of customers becomes so huge (thousands to millions) that one machine cannot cope with the load any more.

So splitting the load by customers to different machines makes sense. This is quite easy when customers are separated per schema. In the good old times of Open Source our customers have implemented …


Containers and databases

Shinguz - Fri, 2022-02-11 15:44

In the last months we got more and more requests for supporting MariaDB/MySQL/Galera Cluster in (mostly Docker) containers.

Because of its additional layer and added complexity I do not like containers much. Containers are more complicated during troubleshooting and debugging problems.

Other people have already written more than enough about the advantages of containers. What is more difficult to find are the disadvantages of technologies. Thus I focus on those:

Wrong technology?

Container solutions were …


Sharding solutions

Shinguz - Mon, 2022-01-24 15:38

Once in a year or so we get a request of a customer about MariaDB/MySQL sharding solutions. So here we have a list of sharding solutions we are currently aware of:


Learning from the Bugs Database

Shinguz - Thu, 2022-01-20 15:05

This week I came across an old known issue reported in May 2010: Master/Slave Replication with binlog_format = ROW and tables without a Primary Key is a bad idea! Especially if these tables are huge.

Why this is a bad idea is described in the bug report #53375:

if one runs DML on a table that has no indexes, a full table scan is done. with RBR, the slave might need to scan the full table for each row changed.

The consequence of this behaviour is that the Slave starts lagging. It was further mentioned: …


MariaDB Deadlocks

Shinguz - Tue, 2022-01-11 15:18

We get ever and ever again customer requests concerning Deadlocks. First of all, Deadlocks are usually an application problem, not a database problem! The database itself manifests the application problem with the following message which is sent to the application as an error:

ERROR 1213 (40001): Deadlock found when trying to get lock; try restarting transaction

If your application receives this error message you know where in your application you have a problem. But a deadlock is always a problem between …


Anonymous PL/SQL block

Shinguz - Mon, 2021-12-13 09:51

Is this not just a simple an Anonymous PL/SQL Block?


MariaDB Devroom at FOSDEM 2022 CfP is now open

Shinguz - Thu, 2021-12-09 16:36

Also in 2022 there will be a FOSDEM (Free and Open source Software Developers’ European Meeting) on 5 and 6 February 2022. This time again online from Brussels (Belgium).

MariaDB has again its own Devroom and the Call for Papers (CfP) is now open for your submissions. We are looking for interesting topics about your daily business, technical presentations, war stories, point of views of management, etc. The deadline for the CfP is before 21 December 2021.

For further information about how to submit a …


MariaDB Connection ID

Shinguz - Mon, 2021-11-29 15:09

The MariaDB Connection ID exists since long ago. So why bother about the Connection ID? Because it is interesting and you can do some interesting things with the Connection ID like tracking statements in your connections and find where they come from your application code.

The MariaDB Connection ID is a strictly monotonic increasing number starting with 1 at server restart:

shell> mariadb --user=root --execute='SELECT CONNECTION_ID()<br>G' | grep CONNECTION_ID
CONNECTION_ID(): 2372
shell> …

GRA_XXX_YYY.log

Shinguz - Mon, 2021-11-29 15:20

XXX means Thread ID (= Connection ID) and YYY wsrep transaction sequence number (wsrep_last_committed?):

snprintf(filename, len+1, "%s/GRA_%lld_%lld.log",
         wsrep_data_home_dir, (long long) thd->thread_id,
         (long long) wsrep_thd_trx_seqno(thd));


MariaDB / MySQL Advanced training end of October 2021

Shinguz - Mon, 2021-10-04 15:12

From 25 to 29 October 2021 (calendar week 43) we will have another MariaDB / MySQL advanced training in the Linuxhotel in Essen (Germany). The training is in German and will take place on-site (3G!). There are still some places free!

More details about the training you can find here.


Upgrade of Galera Cluster takes more than 1 year

Shinguz - Mon, 2021-08-30 09:19

We currently have the situation that a customer cannot upgrade its hyper-consolidated Galera Cluster for more than a year because various different applications cannot, are not willing to or do not have the time to test against the newer version.

What what we suggest here: Create a new Galera Cluster with the new version and move over one project/application after the other to the new Cluster. This reduces complexity. You can do slightly progress and the pressure for the "slow-upgrader" increases over …


Automated MariaDB restore tests

Shinguz - Fri, 2021-08-27 19:38

Nearly everybody does backups. But nobody needs backups! What everybody wants and needs is a working restore not a working backup…

So how to make sure that your backup is working for the restore? There are a few things you can do already during your backup:

  • Check that your backup was running fine. For example by checking the return code of your backup.
  • Check the runtime of your backup. If the runtime of your backup significantly changed, it is worth to have a closer look at the backup.
  • Check the …

FromDual Backup and Recovery Manager for MariaDB and MySQL 2.2.4 has been released

Shinguz - Mon, 2021-08-23 17:14

FromDual has the pleasure to announce the release of the new version 2.2.4 of its popular Backup and Recovery Manager for MariaDB and MySQL (brman).

The new FromDual Backup and Recovery Manager can be downloaded from here. The FromDual Repositories were updated. How to install and use the Backup and Recovery Manager is described in FromDual Backup and Recovery Manager (brman) installation guide.

In the inconceivable case that you find a bug in the FromDual Backup and Recovery Manager please report it to the …


MariaDB Foreign Key Constraint example

Shinguz - Thu, 2021-08-19 10:35

Foreign Key Constraints are used to model a parent/child relation in an entity relationship (ER) model:

SQL> CREATE TABLE team (
  id TINYINT UNSIGNED NOT NULL AUTO_INCREMENT
, name VARCHAR(48) NOT NULL
, PRIMARY KEY (id)
);

SQL> CREATE TABLE employee (
  id SMALLINT UNSIGNED NOT NULL AUTO_INCREMENT
, first_name VARCHAR(32) NOT NULL
, last_name VARCHAR(64) NOT NULL
, team_id BIGINT UNSIGNED NOT NULL
, PRIMARY KEY (id)
, CONSTRAINT `fk_employee_team` FOREIGN KEY (team_id)
  REFERENCES team (id) ON …

Monitoring your MariaDB database with SNMP

Shinguz - Mon, 2021-08-16 14:24

Table of Contents

What is SNMP?

A customer recently had the question if an how his MariaDB database can be easily monitored with SNMP?

SNMP means Simple Network Management Protocol. It is a widely used and standardized protocol for monitoring the health of network and other devices (including services). In principle you can monitor nearly everything with …


MariaDB/MySQL Environment MyEnv 2.0.3 has been released

FromDual.en - Fri, 2021-07-02 15:32

FromDual has the pleasure to announce the release of the new version 2.0.3 of its popular MariaDB, Galera Cluster and MySQL multi-instance environment MyEnv.

The new MyEnv can be downloaded here. How to install MyEnv is described in the MyEnv Installation Guide.

In the inconceivable case that you find a bug in the MyEnv please report it to the FromDual bug tracker.

Any feedback, statements and testimonials are welcome as well! Please send them to …


Query on target list

Shinguz - Mon, 2021-06-28 08:10

Hello Leo

Thank you for your question. What did you try so far? Or where did you stuck? Can you show us the query you have created so far?

An alternative would be to use HeidiSQL, MySQL Workbench or phpMyAdmin to design the right query.

Possibly the GROUP BY clause is what you are looking for. Please read here.

Regards, Oli


Data Warehouse Design

Shinguz - Wed, 2021-06-16 23:02

This is my cheat sheet for dimensional modelling design techniques of a data warehouse (DWH) according to Kimball/Ross.

Dimensional Design Process (p. 38 ff.)

  • Select the business process.
  • Declare the grain (what a single fact table row represents).
  • Identify the dimensions.
  • Identify the facts.

Dimension Tables (p. 46 ff., p. 62 ff.)

who, what, where, when, why and how

  • Dimension tables are entry point to the fact tables.
  • Every dimension table has a single primary key (PK) column.
  • Dimension tables are …

Query performance comparison between MariaDB ColumnStore and other Storage Engines

Shinguz - Thu, 2021-06-03 15:53

Storage Engines like InnoDB, Aria and MyISAM are Row Stores. They store rows one after the other in blocks or even directly in a single file (MyISAM). On the other hand a Column Store like MariaDB ColumnStore stores all the same attributes (columns) of the rows together in chunks.

This is how the table sales_fact looks like:

CREATE TABLE `sales_fact` (
  `product_id` int(11) NOT NULL,
  `time_id` int(11) NOT NULL,
  `customer_id` int(11) NOT NULL,
  `promotion_id` int(11) NOT NULL,
  `store_id` int(11) NOT …

Pages

Subscribe to FromDual aggregator - FromDual all (en)