Showing entries 11843 to 11852 of 44814
« 10 Newer Entries | 10 Older Entries »
Extending Django's QuerySet to return approximate COUNTs

UPDATE: I’ve re-written and open-sourced a better way of doing the below as part of my library django-mysql. The docs there on approximate counting are just as good a read as the below, and you can pip install the solution.

I was looking through the MySQL slow_log for YPlan and discovered that there were a lot of SELECT COUNT(*) queries going on, which take a long time because they require a full table scan. These were coming from the Django admin, which displays the total count on every page.

“Why is …

[Read more]
Recover after DROP TABLE. Case 2

Introduction

In the previous post we described the situation when TwinDB recovery toolkit can be used to recover accidentaly dropped table in the case innodb_file_per_table=OFF setting.
In this post we will show how to recover MySQL table or database in case innodb_file_per_table is ON. So, let’s assume that mysql server has setting innodb_file_per_table=ON. This option tells InnoDB to store each table with user in a separate data  file.

We will use for recovery test the same database sakila, that was used in the previous post.

root@test:/var/lib/mysql/sakila# ll
total 23468
drwx------ 2 mysql mysql     4096 Jul 15 04:26 ./
drwx------ 6 mysql mysql     4096 Jul 15 04:26 ../
-rw-rw---- 1 mysql mysql …
[Read more]
High Availability with mysqlnd_ms on Percona XtraDB Cluster

This is the second part of my series on High Availability with mysqlnd_ms. In my first post, “Simple MySQL Master HA with mysqlnd_ms,” I showed a simple HA solution using asynchronous MySQL replication. This time we will see how to leverage an all-primary cluster where you can write to all nodes. In this post I used Percona XtraDB Cluster, but you should also be able to do the same with MySQL NDB Cluster or Tungsten Replicator.

To start with, here is the mysqlnd_ms configuration I used:

mysqlnd_ms_mm.ini

.  All of these files are available from my Github repository. Below, I have three Percona XtraDB Cluster nodes, …

[Read more]
MySQL Slave Scaling (and more)

Wed, 2014-07-16 11:51jean-françoisgagné

At Booking.com, we have very wide replication topologies. It is not uncommon to have more than fifty (and sometimes more than a hundred) slaves replicating from the same master. When reaching this number of slaves, one must be careful not to saturate the network interface of the master. A solution exists but it has its weaknesses. We came up with an alternative approach that better fits our needs: the Binlog Server. We think that the Binlog Server can also be used to simplify disaster recovery and to ease promoting a slave as a new master after failure. Read on for more details.

When having many slaves replicating from the same master, serving binary logs can saturate the network interface of the master as every change is requested by every slave. It is not unusual to have changes that generate lots of binary logs, two examples are:

[Read more]
Oracle Critical Patch Update for MySQL

Oracle has released the Critical Patch Update (CPU) for July 2014. The Oracle MySQL Risk Matrix lists 10 security fixes.

It took me some time to understand the subcomponent names. So here is the list with the full name of each subcomponent:

Subcomponent Full name
SRFTS Server: Full Text Search
SRINFOSC Server: INFORMATION_SCHEMA
SRCHAR Server: Character sets
ENARC Engine: Archive
SROPTZR Server: Optimizer
[Read more]
How to search for and replace a text string in MariaDB on Linux

Wed, 2014-07-16 08:02carlaschroder

There will come a time when you must search for a particular text string in a field in MariaDB, and you may not know what database or table it might be in. It is somewhat like searching for a needle in a haystack, but fortunately we have good tools for finding our needle. I like to dump the database I'm searching into a text file and do my searches on the file, because it's a fast way to search, and you can mangle the dump file all you want without damaging anything important. When you have the results, you can run SQL queries on the appropriate tables to make the replacements.

As always, be sure you have good backups before you muck around with your MariaDB server. Even better, have a copy of your production server in a sandbox for doing test runs.

First, export your database into a text file, then search the file with your usual text-processing commands (such as grep), or …

[Read more]
MySQL Slave Scaling and more

Jean-François talks about binlog servers. Take a look here: http://blog.booking.com/mysql_slave_scaling_and_more.html

High Availability for Openstack and OpenNebula

High Availability for Openstack and OpenNebula Choon Ming Goh Wed, 07/16/2014 - 08:47 High Availability for Openstack and OpenNebula

If we look in the news since last 8 months or so, we can see that the technology scene is moving towards the cloud. The terms public cloud, private cloud, and hybrid cloud usually crops up and vendors comes up with all sorts of solutions/products for us to use/dissect/troll/shoot. Popular choices are usually Openstack by Rackspace, Eucalyptus by Canonical, CloudStack by Apache Foundation, and OpenNebula by OpenNebula Project. Fret not, for I shall not add another Openstack vs OpenNebula vs Cloudstack vs Eucalyptus blog post to the internet sphere. I believe there are more than enough …

[Read more]
High Availability for Openstack and OpenNebula

High Availability for Openstack and OpenNebula Choon Ming Goh Wed, 07/16/2014 - 08:47 High Availability for Openstack and OpenNebula

If we look in the news since last 8 months or so, we can see that the technology scene is moving towards the cloud. The terms public cloud, private cloud, and hybrid cloud usually crops up and vendors comes up with all sorts of solutions/products for us to use/dissect/troll/shoot. Popular choices are usually Openstack by Rackspace, Eucalyptus by Canonical, CloudStack by Apache Foundation, and OpenNebula by OpenNebula Project. Fret not, for I shall not add another Openstack vs OpenNebula vs Cloudstack vs Eucalyptus blog post to the internet sphere. I believe there are more than enough …

[Read more]
High Availability for Openstack and OpenNebula

High Availability for Openstack and OpenNebula Choon Ming Goh Wed, 07/16/2014 - 08:47 High Availability for Openstack and OpenNebula

If we look in the news since last 8 months or so, we can see that the technology scene is moving towards the cloud. The terms public cloud, private cloud, and hybrid cloud usually crops up and vendors comes up with all sorts of solutions/products for us to use/dissect/troll/shoot. Popular choices are usually Openstack by Rackspace, Eucalyptus by Canonical, CloudStack by Apache Foundation, and OpenNebula by OpenNebula Project. Fret not, for I shall not add another Openstack vs OpenNebula vs Cloudstack vs Eucalyptus blog post to the internet sphere. I believe there are more than enough …

[Read more]
Showing entries 11843 to 11852 of 44814
« 10 Newer Entries | 10 Older Entries »