| 1 | -- The pull, for one reader: make explain Q=pull U=363 |
| 2 | explain (analyze, costs off, timing off) |
| 3 | select p.id |
| 4 | from follows f |
| 5 | join users u on u.id = f.followee_id and u.followers_count >= 1000 |
| 6 | cross join lateral ( |
| 7 | select id |
| 8 | from posts |
| 9 | where user_id = f.followee_id and id < 9223372036854775807 |
| 10 | order by id desc |
| 11 | limit 21 |
| 12 | ) p |
| 13 | where f.follower_id = :user |
| 14 | order by p.id desc |
| 15 | limit 21; |