Jon Gjengset, Malte Schwarzkopf,
Jonathan Behrens, Lara Timbo Araujo, Martin Ek, Eddie Kohler, M. Frans Kaashoek, Robert Morris
Jon Gjengset's YouTube:
id | title |
---|---|
1 | Peloton is the best DBMS |
2 | Terrier: Son of Peloton |
story_id | user |
---|---|
1 | Andy |
1 | Lin |
2 | Andy |
Story
Vote
SELECT Story.id, Story.title, count(*) FROM Story
 JOIN Vote ON Story.id = Vote.story_id
GROUP BY Story.id, Story.title
COUNT
JOIN
SELECT Story.id, Story.title, count(*) FROM Story
 JOIN Vote ON Story.id = Vote.story_id
GROUP BY Story.id, Story.title
Save
Query
Peloton ***, 2
id | title |
---|---|
1 | Peloton is the best DBMS |
2 | Terrier: Son of Peloton |
story_id | user |
---|---|
1 | Andy |
1 | Lin |
2 | Andy |
Story
Vote
SELECT Story.id, Story.title, count(*) FROM Story
 JOIN Vote ON Story.id = Vote.story_id
GROUP BY Story.id, Story.title
COUNT
JOIN
StoryWithVoteCount
Materialized View!
story_id | count |
---|---|
1 | 2 |
2 | 1 |
Operator is stateful
id | title |
---|---|
1 | Peloton is the best DBMS |
2 | Terrier: Son of Peloton |
story_id | user |
---|---|
1 | Andy |
1 | Lin |
2 | Andy |
Story
Vote
COUNT
JOIN
StoryWithVoteCount
story_id | count |
---|---|
1 | 2 |
2 | 1 |
2 | Chenyao |
---|
id | title | count |
---|---|---|
1 | Peloton | 2 |
2 | Terrier | 1 |
2
2
id | title |
---|---|
1 | Peloton is the best DBMS |
2 | Terrier: Son of Peloton |
story_id | user |
---|---|
1 | Andy |
1 | Lin |
2 | Andy |
Story
Vote
COUNT
JOIN
StoryWithVoteCount
story_id | count |
---|---|
1 | 2 |
2 |
WHERE id = 2
id | title | count |
---|---|---|
1 | Pelton | 2 |
2 |
id | title |
---|---|
1 | Peloton is the best DBMS |
2 | Terrier: Son of Peloton |
story_id | user |
---|---|
1 | Andy |
1 | Lin |
2 | Andy |
Story
Vote
COUNT
JOIN
StoryWithVoteCount
story_id | count |
---|---|
1 | 2 |
2 | 1 |
WHERE id = 2
id | title | count |
---|---|---|
1 | Pelton | 2 |
2 |
id | title |
---|---|
1 | Peloton is the best DBMS |
2 | Terrier: Son of Peloton |
story_id | user |
---|---|
1 | Andy |
1 | Lin |
2 | Andy |
Story
Vote
COUNT
JOIN
StoryWithVoteCount
story_id | count |
---|---|
1 | 2 |
2 | 1 |
WHERE id = 2
id | title | count |
---|---|---|
1 | Pelton | 2 |
2 | Terrier | 1 |
id | title | autor |
---|---|---|
1 | Peloton is the best DBMS | Andy |
2 | Terrier: Son of Peloton | Tianyu |
3 | Poker Night | Andy |
story_id | user |
---|---|
1 | Andy |
1 | Lin |
2 | Andy |
3 | Chenyao |
Story
Vote
COUNT
JOIN
StoryWithVoteCount
UserKarma
user | karma |
---|---|
Andy | |
Tianyu |
Just new an operator with empty states!
Lazy Approach!
id | title | autor |
---|---|---|
1 | Peloton is the best DBMS | Andy |
2 | Terrier: Son of Peloton | Tianyu |
3 | Poker Night | Andy |
story_id | user |
---|---|
1 | Andy |
1 | Lin |
2 | Andy |
3 | Chenyao |
Story
Vote
COUNT
JOIN
StoryWithVoteCount
UserKarma
user | karma |
---|---|
Andy | |
Tianyu |
2
id | title |
---|---|
1 | Peloton is the best DBMS |
2 | Terrier: Son of Peloton |
story_id | user |
---|---|
1 | Andy |
1 | Lin |
2 | Andy |
Story
Vote
COUNT
JOIN
StoryWithVoteCount
Readers
Writer
root
Map
Copy #1
Map
 Copy #2
A = 4
A = 4
A = 5
Readers
Writer
root
Map
Copy #1
Map
Copy #2
A = 4
A = 5
A = 5
all the instances hold same data-flow graph