Related Sites
Categories
Archives
-
Recent Posts
Meta
Category Archives: Archives
Dolphins in the Sky
A cloudless night sky is truly amazing, but have you expected to see a dolphin in the sky? What you see here is the Summer Triangle (all Southern hemisphere residents, please apologize), but did you notice the group of stars … Continue reading
Posted in Archives, Astronomy
Leave a comment
Running Stored Procedures on MySQL 4.x
Is it possible to run Stored Procedures on MySQL 4.x? Yes and no – of course the feature is not available directly in MySQL 4.x, but if you have a MySQL 5.x server with the FEDERATED Storage Engine available, it’s … Continue reading
Posted in Archives
Leave a comment
Sorting of numeric values mixed with alphanumeric values
Assume that you have a list of numeric values mixed with numeric values appended with characters – like 2a, 12, 5b, 5a, 10, 11, 1, 4b. Sorting on a list like this would usually end up so: mysql> SELECT version … Continue reading
Posted in Archives
Leave a comment
A little (?) brain exercise
I wanted to try out something that first seemed to be quite simple, but then I had to see that I didn’t manage to get the desired result in one single query. Maybe one of you has an idea how … Continue reading
Posted in Archives
Leave a comment
The downside of information_schema
In general, information_schema is a great thing – you can get all kinds of information out of it in quite a simple way. But it has a downside – on a server with lots of databases and tables, it can … Continue reading
Posted in Archives
2 Comments
Still no access to the original view definition
One of the biggest annoyances in the current MySQL versions is that you still have no access to the original view definition (at least by SQL, there is a way through the file system, which I described in a former … Continue reading
Posted in Archives
Leave a comment
How to calculate the sizes of your databases
You may have seen several great queries how to get useful information out of information_schema – so here’s one more: SELECT TABLE_SCHEMA, sum((DATA_LENGTH + INDEX_LENGTH) / (1024 * 1024)) as size_mb FROM information_schema.TABLES GROUP BY TABLE_SCHEMA ORDER BY size_mb DESC … Continue reading
Posted in Archives
Leave a comment
The PROCEDURE ANALYSE option
Andrew recently wrote about his plans to take the MySQL Certification exams and that he finds interesting new things that he learns from his studies. I can really confirm this – I also learnt a lot when I studied for … Continue reading
Posted in Archives
Leave a comment
Trigger privileges in MySQL 5.1.6
There are more great news about MySQL 5.1.6. MySQL 5.1.6 will introduce the new TRIGGER privilege. From then on, you won’t have to grant SUPER privilege (which allows much more than creating and dropping triggers, so it might not be … Continue reading
Posted in Archives
Leave a comment
Foreign key dependencies
Let me give you another great example that demonstrates the power of information_schema. Assume that we create two tables which are combined by a foreign key constraint: mysql> CREATE TABLE tt1 ( -> id INT UNSIGNED NOT NULL AUTO_INCREMENT PRIMARY … Continue reading
Posted in Archives
Leave a comment