Archive for the ‘mysql’ Category
total mysql rows
Turns out our Mysql server at work is a little bigger than I thought: Databases 75 Tables 1,549 Rows 1,018,085,348 However over the last couple of months, we’ve only averaged 130 queries/second Hacked up PHP to gather stats: class MysqlCounter { public function __construct($host, $username, $password) { [...]
Now with added Slicehost
This website is now hosted on Slicehost (along with section99.net). It’s a little early to know how it will turn out, but so far I’m loving having not only a shell, but root access. Signing up was completely painless and the the VPS was provisioned within minutes with several different operating system options (though I’m [...]
Very Simple (Pretend) SQL Paramaters
<?php /* Some hacked up code for Very Simple (Pretend) SQL Paramaters — For when you don’t have PDO, or just can’t be bothered Examples: >>> SQL("SELECT * FROM users WHERE id=? AND name LIKE ?", 123, ‘"123\"’); SELECT * FROM [...]
qpsmon v0.1
This is a simple script that will print the average qps (using a specidied peri0d) for one or more MySQL databases. If doesn’t have many practical uses, but it’s fun to watch when running large imports or exports. Screenshot <?php /* qpsmon.php v0.1 This is an (extremely) simple script that will [...]
MySql: Always learning something new
mysql> SELECT "50" > 100, 50 > "100", "100" > 50, 100 > "50", "100" > "50", "50" > "100"; +————+————+————+————+————–+————–+ | "50" > 100 | 50 > "100" | "100" > 50 | 100 > "50" | "100" > "50" | "50" > "100" | +————+————+————+————+————–+————–+ | 0 | [...]
Working with MySQL
matthewd@carbonara:~$ mysql Welcome to the MySQL monitor. Commands end with ; or \g. Your MySQL connection id is 2792799 Server version: 5.0.38-log Gentoo Linux mysql-5.0.38 Type ‘help;’ or ‘\h’ for help. Type ‘\c’ to clear the buffer. mysql> use b3 Reading table information for completion of table and column names You can turn off this [...]
