Everything Aurora (MySQL)

Recently AWS released their version of MySQL called Aurora, they claim it delivers up to five times the throughput of standard MySQL. This article explores some of the depths of this database technology, especially coming from an Oracle Database background. Character Sets In an Oracle system, you can define 2 character sets, one is used … Read more

How to Perform a AWS Aurora Point In Time Recovery

AWS Aurora Point in time recovery Restore AWS Aurora from Point in time snapshot (go back to a specific point in time). These are the Steps Restoring to point in time snapshot of AWS RDS Aurora (to any time with-in the backup retention period irrespective of the frequency of automated backups). 1. In AWS console, … Read more

How to Restore an RDS database in AWS

Restore from a snapshot (either manual or automated). NOTE: To restore the new instance with same as the original one, first the old/original instance must be renamed to something else then the new instance from snapshot can be restored with the required name (can be same as old). Restoring from manual/automated snapshot of AWS RDS … Read more

Archive Log Information

SELECT ‘ restore archivelog from logseq ‘ || applied_arc.startNo || ‘ until logseq ‘ || catalog_arc.endNo || ‘ thread=’ || catalog_arc.thread# || ‘;’ “Restore Command” FROM applied_arc, ( SELECT thread#, MAX (sequence#) startNo FROM gv$archived_log WHERE applied = ‘YES’ GROUP BY thread#) applied_arc, ( SELECT thread#, MAX (sequence#) endNo FROM v$backup_archivelog_details GROUP BY thread#) catalog_arc … Read more

How to stop and start RDS instance in AWS using Python

I’ve been working on a project that requires us to shutdown and startup our development databases to save costs.. I’ve come up with a python script to perform the tasks. This could be modified to your own requirements. Here is the code: import boto3 # Author: Mark Young # Date: 19th December 2017 # Detail: … Read more

InnoDB Information

SHOW ENGINE INNODB STATUS SHOW ENGINE INNODB MUTEX SHOW ENGINE {NDB | NDBCLUSTER} STATUS SHOW ENGINE PERFORMANCE_SCHEMA STATUS Displays extensive information from the standard InnoDB Monitor about the state of the InnoDB storage engine. There are four types of InnoDB monitors: • The standard InnoDB Monitor displays the following types of information: • Work done … Read more

Calculate MySQL Size

How to calculate the table and database size in MySQL SELECT table_schema “Data Base Name”, sum( data_length + index_length) / 1024 / 1024 “Data Base Size in MB” FROM information_schema.TABLES GROUP BY table_schema ; and SELECT table_name, table_rows, data_length, index_length, round(((data_length + index_length) / 1024 / 1024),2) “Size in MB” FROM information_schema.TABLES where table_schema = … Read more

Calculate Table Size in MySQL

How to calculate all tables in a schema SELECT TABLE_NAME AS “Table Name”, table_rows AS “Quant of Rows”, ROUND( ( data_length + index_length ) /1024, 2 ) AS “Total Size Kb” FROM information_schema.TABLES WHERE information_schema.TABLES.table_schema = ‘YOUR SCHEMA NAME/DATABASE NAME HERE’ LIMIT 0 , 30;