OK, let me start with saying that a table without a primary key
shouldn't be something that a DBA should ever stumble into.
Sure, InnoDB will secretly add one for us without
telling - but that's not something we can use at application or
administration level, it's just to make the engine happy.
So let's suppose you find some tables that lack a primary key, of
course you need to do something about it, right? Now, put
Galera Cluster in the mix - Galera does not support tables without a
primary key and will, secretly again, make that table
inconsistent at cluster level.
You need to fix the damn table(s)!! And this is where the fun
begins... as you can't afford downtime for the operation so
you need to resort to an online schema change of some type.
Galera cluster is …
In this blog post we’ll look at how to move a MySQL partition from one table to another, for MySQL versions before 5.7.
Up to version 5.7, MySQL had a limitation that made it impossible to directly exchange partitions between partitioned tables. Now and then, we get questions about how to import an .ibd for use as a partition in a table, as well as how to exchange partitions with another partitioned table. Below is step-by-step instructions on how to move a partition from one table to another.
In this example, one of our customers had two tables with the following structures:
CREATE TABLE live_tbl ( some_id bigint(20) NOT NULL DEFAULT '0', summary_date date NOT NULL, PRIMARY KEY (some_id,summary_date) ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci /*!50500 PARTITION BY RANGE …[Read more]
Thanks Mauritz, you are right. I’ll update the post but still the explain plan is confusing!
LikeLike
Dear MySQL Users,
A new GA (general availability) version of MySQL Connector/C
has
been made available: MySQL Connector/C 6.1.9 GA. The MySQL
Connector/C provides a C API for connecting client applications
to
the MySQL Server 5.5 or newer.
You can download the production release at:
http://dev.mysql.com/downloads/connector/c/1.1.html
MySQL Connector C (Commercial) will be available for download on
the
My Oracle Support (MOS) website. This release will be available
on eDelivery
(OSDC) in next month’s upload cycle.
We have improved the driver since the last GA release. Please see
the
documentation and the CHANGES file in the source distribution for
a
detailed description of bugs that have been fixed. Bug
descriptions are
also listed below.
Enjoy!
…
[Read more]This post will be updated as soon more information comes along.
This developer version wasn’t released yet, when it does, use at your own risk.
Oracle released the development version of MySQL 8.0.0-dmr on September 12th of 2016. Since then, the team have been working on the 8.0.1 development milestone. You can find the partial change list here.
The objective here is try to explain how this will have any real world impact for you from 8.0.1. Please remember though, that any changes made to this version will not be final until the General Availability (date not currently set).
These topics are aimed at the Software Engineering side and not DBA and this is why Replication, for instance, is not covered …
[Read more]FOSDEM is happening again in Brussels, and as usual, there will there be a MySQL and Friends Devroom. We can’t really imagine having a FOSDEM without having a MySQL and Friends Community Dinner, so here we are again..
Like the last couple of years, we have rented the same private space at ICAB, more detailed directions below.
You can buy tickets for the dinner at https://fosdem2017mysqlandfriendscommunitydinner.eventbrite.com
The listed ticket price includes a selection of Belgian Speciality Beers and food will be Belgian food served by a new (and improved) caterer: …
[Read more]For PARTITION_BALANCE see http://dev.mysql.com/doc/refman/5.7/en/create-table-ndb-table-comment-options.html
Note, that the default number of partitions are the least that in general spread the write load evenly among all LDM-threads. My personal belief is that very few applications will have an overall gain from changing the default PARTITION_BALANCE.
This post discusses the next MySQL development milestone: MySQL 8.0.1.
From the outset, MySQL 8.0 has received plenty of attention. Both this blog (see the MySQL 8.0 search) and other sites around the Internet have covered it. Early reviews seem positive (including my own MySQL 8.0 early bugs review). There is plenty of excitement about the new features.
As for early feedback on MySQL 8.0, Peter Zaitsev (Percona CEO) listed a set of recommendations for benchmarking MySQL 8.0. I hope these get reviewed and implemented. …
[Read more]The default sharding key is still the primary key!
To see that 7.5.4 does not behave as hidden pk case in 7.2.26, look also in the other columns of explain output. The partitions column should be ignored for NDB tables.
Still, you found a bug. The explain output should not depend on how partitioning is specified as long as it is the same.
For NDB the partition pruning is actually not done by the optimizer in MySQL server but within NDB itself.
To inspect the table definition used within NDB one can use ‘ndb_desc -d shard_check_pk’ it should reveal that there are no extra hidden columns, and also that the sharding key called distribution key in NDB is the same as the primary key.
LikeLiked by …
[Read more]