Glad You're Ready. Let's Get Started!

Let us know how we can contact you.

Thank you!

We'll respond shortly.

Standup 04/14/2010 – MySQL and Cloudfront

Interesting Things

  • One of our teams saw a significant (20%+) speedup on their product by switching to Amazon’s Cloudfront service. They’re using Paperclip and it only took about 20 minutes to switch from S3 to Cloudfront.

  • If you have an integer column in MySQL that does not allow NULL values and you update a row and set that column to NULL the column ends up being set to 0. This was very surprising to one of our teams.

  1. Is the purpose of Cloudfront to serve static assets?

  2. Xavier Shay says:

    You can make MySQL reject invalid data by setting the following config option in my.cnf (or you can set it per session to play around with it):


    I highly recommend you do so!

    Without it (so, by default), MySQL will silently truncate strings, insert invalid dates (0000-00-00), set NULLs to 0, and wraparound the overflow of integers that are too big for the column(!).

    While I’m on the topic of crazy MySQL defaults, you may also want to consider setting the isolation level to READ-COMMITTED also (oracle/pg default), by default it’s REPEATABLE READ which has non-intuitive behaviour.


    (this is a much bigger change than the above though, make sure you read up on it first)

Post a Comment

Your Information (Name required. Email address will not be displayed with comment.)

* Copy This Password *

* Type Or Paste Password Here *