Mysql linux shell commands to get tables list and basic statistics
Mysql is so common that its good idea to have some command line scripts or tricks. Sometimes you need to execute some SQL queries on set of tables or all of them or get stats or fix tables etc.
Its good to be able quickly get list of tables and basic stats.
You can make bash script of it or just type in the command line:
# Put your database name here export SET dbname='drupal'; # List all tables in the database echo "show tables;" | mysql -u root $dbname |grep -v '^Tables_in_' > tables.txt # Show tables status (tables' engine, rows count, table size, index size, collation, comment) echo "show table status;" | mysql -u root $dbname > table_status.txt # Get each tables indexes details
Review - High Performance Mysql
High Performance Mysql is hands down the best mysql book i have seen.
I would recommend it to everyone who wants to learn more about mysql, not only for gurus but for everyone. I would recommend it to sys admins and programmers. Especially if you are concerned by performance you should read this book.
Authors describes in details how mysql works, how to tune it, how to avoid benchmarking pitfalls and how to plan for scale.
Replication, tuning, monitoring, backups, sharding and shinx its all there! :- )
Couch DB performance seems to suck
We are looking for some nice solution to store persistently object-like data. Few weeks ago we had a look at Couch DB and performance looked horrible. We did not even bother to make some more realistic tests as initial data was just disqualifying.
We want to store objects with very dynamic schema and be able to index some of the properties. For example we want all objects of type book with title equal to X. We need it to be very fast. And when i mean very fast i mean memcache-kind of fast ;- )
Good riddance mysql!
Recently open source community was shaken by news of Oracle taking over Sun. Well maybe Postgres will finally get its well deserved respect over mysql. You can also read here why do i prefere postgres over mysql.
How to convert drupal 6 site from postgres to mysql
I have a project that was set up on drupal 6 on postgres database as i always prefered it over Mysql.
I am currently in progress of moving some stuff to dreamhost.com (which RULES!) and i finally have shell access and i can actually do stuff. The only problem is they dont support pgsql at all! LOL! So i have decided that it takes too much effort and time to maintain it.
Here are 3 simple steps to migrate your drupal installation (possibly other apps) from postgres to mysql.
digg