main datastore for tweets (500+ million per day before moving away from MySQL) • Facebook – (13 Million queries per second, 3.5 million rows changed per second)
5000 tweets per day 2008 – 300,000 tweets per day 2009 – 250,0000 tweets per day 2010 - 35,000,000 tweets per day 2011 – 200,000,000 tweets per day 2012 - 500,000,000 tweets per day Facebook 2004 – 1 Million monthly users 2005 – 6 Million monthly users 2006 - 12 Million monthly users 2007 – 58 Million monthly users 2008 – 145 Million monthly users 2009 – 360 Million monthly users 2010 – 608 Million monthly users 2011 – 845 Million monthly users 2012 – 1,056 Million monthly users 2013 – 1,230 Million monthly users
grows tasks become more complex as they take longer to perform Scenario: As part of our previous optimizations efforts we’d like to add a new INDEX/KEY to one of our tables Problem: We have 10 million rows and adding the INDEX will cause a full table lock for an unforeseeable amount of time
same structure plus your new index 2.) create a trigger to migrate hot data (new records to your new table) 3.) Insert select from old table to new table 4.) switch the names of the tables (our new table becomes our production table Or