Category Archives: mysql

Basic Introduction to Mysql InnoDB Performance Tuning – What are the best resources?

I used to manage a couple very large MySQL Databases (like, 1TB+). They were huge, unforgiving beasts with an endless appetite to cause me stomach problems. I read everything I could find on MySQL Performance Tuning and innodb. Here’s a … Continue reading

Posted in mysql, open source, programming | Tagged , , | 1 Comment

BarCamp Boston 6, April 9-10, 2011 Cambridge, MA

Make sure you don’t miss one of the best tech events of the year in the Boston Area: Barcamp Boston 6, April 9-10 in Cambridge, MA. From the site: “BarCamp Boston is Boston’s geek unconference, organized on the fly by … Continue reading

Posted in career, leanstartup, mysql, programming, ruby on rails | Leave a comment

How to create a TIMESTAMP/DATETIME column in MySQL to automatically be set with the current time

The TIMESTAMP data type is the only way to have MySQL automatically set the time when a row was inserted and/or updated. DATETIME columns can’t do this. TIMESTAMP columns are identical to DATETIME columns with one important exception — they … Continue reading

Posted in mysql | Tagged , | 13 Comments

MySQL Integer sizes and ranges of values – How-To Create Table example

There are 5 different integer columns, each hold integer values of different sizes. Moreover, each can be signed or unsigned. If your value can’t ever be negative (for example, for an index), then you should probably make your values unsigned. … Continue reading

Posted in mysql | Tagged , , | Leave a comment

How-To MySQL CREATE TABLE Example showing default values, NULL values and comments

This example shows how to set default values for each column — as well as how to allow (or not allow) NULL values in the column. By default, any column can contain NULL values. (Note that we’re also using “CREATE … Continue reading

Posted in mysql | Tagged , , | 8 Comments

Basic How-To Example of a MySQL CREATE TABLE command

Here’s a basic example of a MySQL CREATE TABLE command. CREATE TABLE `foo`.`example_01` ( `field_1` VARCHAR(255), `field_2` CHAR(10), `field_3` INT(10), `field_4` BIGINT(20), `field_5` DATETIME ); Notice that the ‘back tic’s on each column definition (the little ` characters) are optional … Continue reading

Posted in mysql | Tagged , , | 1 Comment

A Simple Example of a MySQL Stored Procedure that uses a cursor

(Save this to!) What is a cursor and when should you use one? A ‘cursor’ in MySQL is essentially just the result set that’s returned from a query. Using a cursor allows you to iterate, or step through, the … Continue reading

Posted in mysql | Tagged , | 40 Comments