Showing posts with label MySQL. Show all posts
Showing posts with label MySQL. Show all posts

MySQL Finding Index Information

Going to make this short and sweet.  I was recently dealing with an index and want to know the size of one specific index on a table.

MySQL Enterprise Backup (MEB) Compress Option

I have used compression tools before and was interested to understand a little more about MEB's use of compression.  Jumping straight in, here are a couple of points to consider:
  • the backup compression feature only applies to InnoDB tables.  
  • when InnoDB tablespace files are compressed during backup, they receive the extension .ibz rather than the usual .ibd extension.  
  • you can only use the --compress option for full backups, not for incremental backups.

Running a SQL Script on Startup



Running sql on startup is something Oracle does via STARTUP trigger.  This can also be done via my MySQL but requires some extra steps

MySQL 5.6 DateTime Column Type


Whilst migrating a table I found an interesting thing.  The table contained a datetime field and the plan was to migrate directly from 5.5 to 5.6.  The method I choose was to SELECT INTO....OUTFILE (mainly because the table was large, over 1 billion rows, and is partitioned).  As I was loading the data into the table using LOAD INFILE it was thoroughing out errors:

ERROR 1292 (22007): Incorrect datetime value: '1970-01-01 00:00:00' for column 'publish_date' at row 2374801

Interestingly enough the earliest time the column can have is '1970-01-01 00:00:01' UTC. 

MySQL has annonced that 5.6 is now GA.