Slide 51
Slide 51 text
Counters
CREATE TABLE user_tweet_counts (
user_id INT,
tweet_count COUNTER,
!
PRIMARY KEY (user_id)
);
!
UPDATE user_tweet_counts SET count = count + 1
WHERE user_id = 1337;
!
INSERT INTO tweets (id, user_id, body)
VALUES (NOW(), 1337, ‘some tweet’);