I'll be speaking at Percona Live Conference and Expo in Santa
Clara (April 22-25 2013) and this time I'll do a different
talk from what I usually do. The plan here is to be low-level
dirty practical, showing stuff using the Amazon AWS API, writing
scripts using them and showing how to use them together with
MySQL. I have said it before and I say it again, to get the most
from your cloud, you have to understand and use the unique
features of the cloud environment you use.
Can you create an elastic MySQL setup on Amazon? What about HA?
How can you add slaves seamlessly? And automatically? I'll try to
cover and show as much of this is possible, but the presentation
is far from ready so I am happy to accept suggestions on
specifics to cover here. See some more details on my talk
…
The recent release of the MariaDB client libraries
has prompted questions about their purpose as well as
provenance. Colin Charles posted that some of these would be answered in the very near
future. I have a couple of specific questions about the
MariaDB JDBC driver, which I hope will be addressed at that time.
1.) What is really in the MariaDB JDBC driver and how
exactly does it differ from the drizzle JDBC
driver? What, if any, relation is there to Connector/J
code? There is a …
For those starting to learn MySQL and want to install it on a
Raspberry Pi: there is a little gotcha you should be aware
of.
Disclaimer: Only run command if you know what it does. Always
make sure you have backups of your important data.
First you need to put the official Raspbian image on your SD card
and then boot the Raspberry Pi.
Then if you try to install mysql with "sudo apt-get install
mysql-server-5.5" this will fail. The reason for this is that the
filesystem on the SD card will become full. This can be seen by
running the "df -h" command.
The SD card is probably 4GB. The filesystem will be around 1.9GB.
This was done to make it fit on 2GB cards. To stretch the
filesystem to complete 4GB you need to run "sudo raspi-config"
and choose the "expand_rootfs" option. Then you need to
reboot.
Now "df -h" should tell you that the filesystem has much more
free space. …
Being the end of the quarter, there has been some planning going on this month about goals for Q1 2013 as well as meeting our goals for Q4 2012. Our biggest goal was to stop using MySQL 5.0, which we have successfully done. We only have one server left on MySQL 5.0, and that has a compatible MySQL 5.1 server waiting for a few developers to get back from their well-deserved vacations to migrate off. In December, we finished upgrading 2 servers to MySQL 5.1.
- Looked at the top 30 Bugzilla queries and started to give
optimization tips for MySQL.
- Did our regular purge/defrag of TinderBox
PushLog.
- Worked on integrating our datazilla code with chart.io features.
- Helped change the data model …
I’m not a wizard with infographics, but I can do a few pie charts. I copied the data to the right of the pie charts for those that want to see the numbers. Overall, there are almost 400 databases at Mozilla, in 11 different categories. Here is how each category fares in number of databases:
Here is how each category measures up with regards to database size – clearly, our crash-stats database (which is on Postgres, not MySQL) is the largest:
So here is another pie chart with the relative sizes of the MySQL
databases:
I’m sure I’ve …
[Read more]With Performance Schema improvements in MySQL 5.6 I think we’re in the good shape with insight on what is causing performance bottlenecks as well as where CPU resources are spent. (Performance Schema does not accounts CPU usage directly but it is something which can be relatively easily derived from wait and stage information). Where we’re still walking blind with MySQL is resource usage – specifically Memory Usage.
I can’t count how many time I had to scratch my head with system configured to consume only few GBs in global buffers growing to consume much more for some unknown needs leaving me puzzled whenever it is user variables, complex stored procedures temporary tables or something else. Not only such connection related allocations are invisible but many global allocations are poorly visible too. Sure, we know how much memory was allocated for Innodb Buffer Pool or Query Cache but amount of memory used for …
[Read more]Two MySQL Tech Tours will happen during January in the Bay Area. Pleasanton will be January 22nd followed the 23rd by Belmont.
Big Data and High Availability with MySQL
Please join us for our Tech Tour event hosted by Oracle MySQL experts and learn more about Oracle’s strategy for MySQL, including continued investment in the world’s most popular open source database. The MySQL experts will be on hand to introduce new features in the MySQL 5.6 GA and discuss the new commercial extensions.
Register for any of our sessions and learn about:
MySQL High Availability Strategies (including …
[Read more]This podcast would not achieve its goal if there were no listeners to learn about MySQL. This week we play a bunch of bloopers as our year-end gift to you. We hope these make you laugh!
I think MariaDB has had a great few weeks recently and the timeline of these events are important.
- 27 November 2012 – WiredTree Adds MariaDB for Faster MySQL Database Performance (well worth reading their motivations to switch)
- 29 November 2012 – Monty Program & SkySQL release the MariaDB Client Library for C & Java
- 4 December 2012 – MariaDB Foundation is announced, see ZDNet coverage.
- mid-December 2012 – Wikimedia Foundation starts migrating …
One of the most complex problem I’ve seen as a developer is dealing with some kind of hierarchy in a data model. It’s not much about storing the relationship but more it comes to generating reports that take into account this hierarchy.
In this post, I will expose a simple approach I’ve found while dealing with these issues. For the sake of this demonstration we will use the following scenario:
You are managing an affiliate program in which you pay users $5 for each user they refer. On top of that you have a 3-tier commissions on purchases these users make. You pay 5% of the total amount to direct referrals, 2% on level 2 referrals and 1% on level 3 referrals.
Table Structure
Here is the table structure we will be using for this scenario.
Users
| id | username | …