Because finding anything in this page is harder than it should be
| Date | Article | Contents |
|---|---|---|
| 2015-02-02 | Unearthed Arcana: Eberron [PDF] | Changelings, shifters, warforged, Wizard (Artificer), rules for action points, dragonmarks |
| -- List the disk size of all tables and partitions in MySQL/InnoDB. | |
| SELECT | |
| isp.Schema, | |
| isp.Table, | |
| isp.Partition, | |
| ROUND(isit.size / 1e+6) AS 'MB', | |
| ROUND(isit.size / 1e+9) AS 'GB', | |
| ROUND(isit.size / 1.1e+12, 2) AS 'TiB', | |
| isit.File | |
| FROM ( |
Because finding anything in this page is harder than it should be
| Date | Article | Contents |
|---|---|---|
| 2015-02-02 | Unearthed Arcana: Eberron [PDF] | Changelings, shifters, warforged, Wizard (Artificer), rules for action points, dragonmarks |
| -- Show all tables and their corresponding innodb_table_per_file files (if present) | |
| SELECT * | |
| FROM ( | |
| SELECT | |
| TABLE_SCHEMA as 'Schema', | |
| TABLE_NAME as 'Table', | |
| ROUND((DATA_LENGTH + INDEX_LENGTH) / 1024) as 'Info MB', | |
| ROUND((DATA_LENGTH + INDEX_LENGTH) / 1024 / 1024, 6) as 'Info GB', | |
| (DATA_LENGTH + INDEX_LENGTH) / 1099511627776 as 'Info TiB' | |
| FROM INFORMATION_SCHEMA.TABLES |
| -- Give a quick MySQL/AuroraDB database a simple health check. | |
| -- See comments below to customize to your needs. | |
| -- (this is all one query) | |
| -- Step 1: Find very large tables | |
| SELECT 'Table is very large' AS `Issue`, | |
| NULL AS `User`, | |
| NULL AS `Host`, | |
| TABLE_SCHEMA AS 'DB', | |
| TABLE_NAME AS `Table`, |
| DELIMITER ;; | |
| DROP PROCEDURE IF EXISTS `assasinate`;; | |
| CREATE PROCEDURE `assasinate`(queryportion VARCHAR(255)) | |
| BEGIN | |
| DECLARE sql_string MEDIUMTEXT; | |
| DECLARE count MEDIUMINT; | |
| SET SESSION TRANSACTION ISOLATION LEVEL READ UNCOMMITTED; | |
| SET FOREIGN_KEY_CHECKS = 0; | |
| SET @count = 0; | |
| SET @sql_string := 'tmp'; |
There are two versions, one is for dark letters on a bright background, the other one for bright letters on a dark background.
The bright on dark version looks better, so go for that one if you can :)
| -- Note, this will CANCEL commits if they take more than 20s to complete. | |
| -- It is assumed that if you have commit latency greater than 20s that something is terribly wrong, | |
| -- and you are now losing data due to a lack of throughput already. | |
| -- This will help resume opperation at the cost of potentially dropping locking changes. | |
| -- Create a stored proceedure that can recover from a commit latency lock-up | |
| -- Do not run multiple of this at once. | |
| -- When running loop and kill till there are none to kill. | |
| DROP PROCEDURE IF EXISTS `recover_commit_latency`; | |
| DELIMITER ;; |
| <?php | |
| /** | |
| * Class TimeZoneOptionCollection | |
| * | |
| * Dynamic collection of supported PHP Timezones: | |
| * - Grouped by country | |
| * - Commonly used abbreviations | |
| * - DST indicators | |
| * - Future-proof (leans on PHP for timezones). |