Infobright today announced the general availability of BrightHouse Version 2.3 with enhanced support for complex and ah-hoc queries across very large amounts of data.
This article shows the easiest way to audit commands to a MySQL database, assuming all content happens from an application. Now, this will use a lot of storage, and doubles the query load for each query, but it’s useful for when you know you want to capture the information of someone using the application.
The basic premise is simple. Logon to your nearest MySQL server and type the following:
SELECT CURRENT_USER(), USER();
Chances are the values are different. More on this later.
First, create a table:
CREATE TABLE `action` (
`user` varchar(77) NOT NULL default '',
`asuser` varchar(77) NOT NULL default '',
`db` varchar(64) NOT NULL default '',
`query` mediumtext NOT NULL
) ENGINE=MyISAM DEFAULT CHARSET=utf8;
Why varchar(77)? Because the mysql.user table puts a maximum of 16 characters for the username, and 60 characters for the …
[Read more]I’ve been thinking about the query cache since last years user conference. One of the features of the query cache is that it’s completely transparent to client. It achieves this by clearing cache entries for tables as soon as the tables are updated. This makes the cache inefficient for tables that are constantly updating.
While thinking about this also thought about slaves and non critical reads. In a replication setup reads that are sent to slaves expect to get data back that might not be the most current. In this situation it doesn’t make sense to expire the cache for every single update because queries running against the slave already know that they are going to get back slightly old data. I thought, “Why not add a time to live to cache entries instead of clearing them for every update?” So, I did.
I added an option to select called sql_cache_ttl. This option instructs the query cache hold the entry in the cache for …
[Read more]The value of data stored in LAMP applications is increasing at an exponential pace. Indeed, the LAMP stack fuels an economy of its own - with its own currency, lingo and players. While e-commerce is the clear and present evidence of the LAMP powered economy, the currency for this economy is by no means just monetary. Value is manifested in many factors other than financial gains: personal reputation and legacy, karma points, creativity etc. The LAMP stack fires up innovation by enabling new ideas - you can quickly and cost-effectively prototype a concept which other’s may find bizarre.
User generated content (UGC) is one key currency of the LAMP stack. UGC, even votes (ok, diggs) on other’s UGC store tangible and lasting value. While naming “You”, a proxy for UGC, the Time’s Person of the Year 2006, The Time magazine said: “It’s a story about community and collaboration on a scale never seen before. It’s about the many …
[Read more]Due to unfortunate circumstances, Zak Greant is unable to attend the MySQL User Conference this year.
Because Zak is a good friend (and I am a glutton for punishment), I agreed yesterday to take on his talk for MySQL beginners titled MySQL Sandalcamp. It should be a good session for those who are completely new to MySQL, covering the basics of what a database is, how to create, populate and query tables.
So if you ever wanted to see what I can put together in two days while traveling, stop by and check it out (unless you already know how to assemble a SELECT query, in which case you will be very bored).
Next up, my Hierarchies talk on …
[Read more]A quick note for those of you enjoying the MySQL Conference & Expo 2007 in Santa Clara this week. As part of Pythian’s Gold sponsorship of the conference, we’re trying something new. We understand that the tradeshow floor for booth sponsors is a bit out of the way, and in any case, there were no [...]
It was a nice enough flight from Ottawa to Chicago to San Jose, if a little long. Security (or the baggage handlers) completely trashed our boxes of information folders, but I think we managed to salvage some… so if you’re looking for information on Pythian, come see us early. The weather here is just like [...]
Despite of my high load at work I decided to release mmm-1.0-pre2 today. There are some small, but critical fixes added and much more coming next week (or little bit later if mysqlconf will take more time than I think).
After the first alpha release I’ve received lots of emails, some messages in mmm-devel mail list and even some bug reports in Google Code bug tracking. One of the most asked things was documentation. So, I decided to write some posts in this blog (sorry to non-sql-related readers) and them compose some docs for final release using these posts and comments from readers. This post will be first in mmm-series and will describe how to use mmm in simple master+master scheme where one master …
[Read more]My first tutorial today at MySQL Conference 2007 is Scaling and High Availablilty Architectures by Jeremy Cole and Eric Bergen of Proven Scaling.
Basic Tenets
While not discussed, the premise is to Cache Everything. MemCache is a key component to any scalable system.
Lifetime of a scalable system
Using the analogy from a newborn child Jeremy stepped us through the categories Newborn, Toddler, Teenager, Late teens to 20s, Adult.
In Late teens to 20s, is where most systems die a slow death, he termed “the awkward stage”. This is where scalability is critical, and a meltdown for example can ruin you. Downtime is also just not acceptable for your user community.
When your Adult you need to perfect the …
[Read more]
Marten invited me to join the MySQL staff party yesterday at his
own house, where everybody would socialize before the rough
conference week. I must confess I enjoyed it really much: very
nice place with beautiful views, great people from all around the
world, Nordic food prepared by a Swedish chef, an incredible
magician playing tricks with cards (he found a card in my ear!).
Marten’s family was very charming and the ambience was just
great. This is a great start for the week