Vadim Tkachenko of Percona benchmarks Galera versus standalone Percona Server and stock MySQL replication using tpcc-mysql.
Would you like to see the EXPLAIN output for all MySQL queries of any
PHP application without changing the application much?
Easy-peasy: compile PHP to use the mysqlnd library, install
PECL/mysqlnd_uh and paste 22 lines of evil code
into your auto_prepend_file .
class conn_proxy extends MysqlndUhConnection {
public function query($conn, $query, $self = false) {
if (!$self) {
$this->query($conn, "EXPLAIN " . $query, true);
if ($this->getFieldCount($conn)) {
printf("\tAuto EXPLAIN for '%s'\n", $query);
$res = $this->storeResult($conn);
$r = new MysqlndUhresult();
do {
$row = NULL;
$r->fetchInto($res, $row, 2, 1);
if (is_array($row))
printf("\t\t%s\n", …[Read more]
DOCOMO adopts, invests in Couchbase. Apache Cassandra reaches 1.0. And more.
# DOCOMO Innovations adopted Couchbase as DOCOMO Capital invested in the NoSQL database vendor.
# The Apache Software Foundation announced Apache Cassandra v1.0.
# Nuxeo announced the availability of Nuxeo Cloud.
# SGI formed a distribution relationship with Cloudera and …
[Read more]
A new thread pool plugin is now a part of the MySQL Enterprise
Edition.
In this blog we will cover the problem that the thread pool is
solving
and some high-level description of how it solves this
problem.
In the traditional MySQL server model there is a one-to-one
mapping between
thread and connection. Even the MySQL server has lots of code
where thread
or some abbreviation of thread is actually representing a
connection.
Obviously this mapping has served MySQL very well over the years,
but there
are some cases where this model don't work so well.
One such case is where there are much more connections executing
queries
simultaneously compared to the number of CPUs available in the
server. The
MySQL Server also have scalability bottlenecks where performance
suffers
when too many connections execute in parallel.
So effectively there are two …
This is the first blog post in a series designed to assist companies who wish to migrate their code from Oracle to MySQL.
During the World War II “Battle of the Bulge”, General McAuliffe said to the German forces who asked for his surrender: “Nuts!” The rest is history – he won the battle, and the allied forces won the war.
Some things are like that. So absurd that “Nuts” is the only possible reaction. And frankly – running your web infrastructure on an Oracle database is one of those things.
Now, the pricing issue is very well covered. Just see here. And for most people, this should be enough. We had a customer migrating from a 7M USD environment to a 200K yearly environment (licensing and support) – definitely worth the migration hassle!
But it’s not …
[Read more]
Team Codership will give a Galera presentation in
the next event of the distinguished PerconaLive conference series
in London (Oct 25).
We will send a three person mini-delegation in the conference,
and here we follow the guidelines we have been preaching to the
Galera community for long: always have at least three members in
the cluster for high availability. With the presence of
conference buffets, evening reception, London attractions, pubs &
night life, Chelsea stadium etc..., our team may have to do a few
internal failovers. But, three member staffing guarantees that at
least one of us is available at all times for any discussion you
may want to get us involved with, preferably HA, replication or
clustering related, as these topics make our world tick.
Our …
A new feature just got merged into mysql-trunk, the GET DIAGNOSTICS statement.
Many people have been asking for this
for a very long time, so it is worth mentioning it.
mysql> select version(); +--------------+ | version() | +--------------+ | 5.6.4-m6-log | +--------------+ 1 row in set (0.00 sec) mysql> drop table test.no_such_table; ERROR 1051 (42S02): Unknown table 'test.no_such_table'
Why is it important ? In short, it allows to programmatically
(i.e., in SQL) inspect what happened in a SQL exception.
mysql> get diagnostics condition 1 @p1 = MESSAGE_TEXT, @p2 = RETURNED_SQLSTATE, @p3 = MYSQL_ERRNO, @p4 = SCHEMA_NAME, @p5 = TABLE_NAME; Query OK, 0 rows affected (0.00 sec)
…
Continuing the review of MySQL Connector/J’s built-in extension points from my recent JavaOne and Silicon Valley Code Camp presentations, this blog posting will focus on the StatementInterceptor extension point. As the name suggests, this allows you to hook into statement execution and alter behavior – without changing application-side code. This corresponds to slide #59 in my slide deck, and there are two Java files we’ll reference:
- demo.connectorj.StatementInterceptorExample
- demo.connectork.plugins.ExampleStatementInterceptor
To implement a statement interceptor, you need to do the following:
- Create a Java …
[...] This is the first of a handful of posts to augment the presentations I gave at Java One and Silicon Valley Code Camp earlier this month. It seems I significantly overestimated how much content I could effectively deliver in the time allotted, and left a few of my major points untouched. These blog posts will try to rectify that. The first major area I failed to cover in depth was really “Extension Points”, starting from slide #56. There are four major extension points in Connector/J: Lifecycle Interceptors Statement Interceptors Exception Interceptors Loadbalancing Strategies We’ll look at the first in this post. Connection lifecycle events can be useful for instrumenting or debugging application database behavior, without changing application code. In Connector/J, you can intercept the following lifecycle events by implementing com.mysql.jdbc.ConnectionLifecycleInterceptor: Connection creation (via the init() …
[Read more]A short while ago I posted an article on the codecentric blog about why good metrics can be, but need not be equal to good software quality. As I wrote earlier, I will add links to this blog whenever I post something of interest to the company site.
The post is available in both English and German at http://blog.codecentric.de/en/2011/10/why-good-metrics-values-do-not-equal-good-quality.