explain.depesz.com

PostgreSQL's explain analyze made readable

Result: fppM

Settings
# exclusive inclusive rows x rows loops node
1. 14,759.712 325,374.179 ↑ 625,288.9 14 1

Hash Join (cost=7,317,212.12..11,254,891.76 rows=8,754,044 width=1,607) (actual time=310,655.633..325,374.179 rows=14 loops=1)

  • Hash Cond: ((first_value(x.id) OVER (?)) = s_cf.id)
2. 1.029 19.728 ↑ 625,288.9 14 1

WindowAgg (cost=5,888,051.64..6,085,017.63 rows=8,754,044 width=1,328) (actual time=19.668..19.728 rows=14 loops=1)

3. 0.647 18.699 ↑ 625,288.9 14 1

Sort (cost=5,888,051.64..5,909,936.75 rows=8,754,044 width=1,312) (actual time=18.694..18.699 rows=14 loops=1)

  • Sort Key: x.person_id, x.channel_partition, x.first_seen
  • Sort Method: quicksort Memory: 39kB
4. 0.019 18.052 ↑ 625,288.9 14 1

Subquery Scan on x (cost=2,787,674.88..3,094,066.42 rows=8,754,044 width=1,312) (actual time=17.976..18.052 rows=14 loops=1)

5. 0.097 18.033 ↑ 625,288.9 14 1

WindowAgg (cost=2,787,674.88..3,006,525.98 rows=8,754,044 width=1,312) (actual time=17.972..18.033 rows=14 loops=1)

6. 0.719 17.936 ↑ 625,288.9 14 1

Sort (cost=2,787,674.88..2,809,559.99 rows=8,754,044 width=1,296) (actual time=17.929..17.936 rows=14 loops=1)

  • Sort Key: s.person_id, s.first_seen
  • Sort Method: quicksort Memory: 39kB
7. 0.062 17.217 ↑ 625,288.9 14 1

Nested Loop (cost=8.69..15,062.15 rows=8,754,044 width=1,296) (actual time=7.502..17.217 rows=14 loops=1)

8. 0.029 0.703 ↑ 22.2 9 1

HashAggregate (cost=8.12..10.12 rows=200 width=16) (actual time=0.692..0.703 rows=9 loops=1)

  • Group Key: a.person_id
9. 0.674 0.674 ↑ 25.0 10 1

Seq Scan on dirty_alias_test a (cost=0.00..7.50 rows=250 width=16) (actual time=0.671..0.674 rows=10 loops=1)

10. 16.452 16.452 ↑ 36.0 2 9

Index Scan using session_clone2dd_cfa9_40bb_89ed_25482f835838__pid_ts on session_clone2dd_cfa9_40bb_89ed_25482f835838 s (cost=0.56..74.54 rows=72 width=1,296) (actual time=1.535..1.828 rows=2 loops=9)

  • Index Cond: (person_id = a.person_id)
11. 12,528.873 310,594.739 ↓ 1.0 17,510,541 1

Hash (cost=1,082,075.88..1,082,075.88 rows=17,508,088 width=95) (actual time=310,594.739..310,594.739 rows=17,510,541 loops=1)

  • Buckets: 8388608 Batches: 4 Memory Usage: 326706kB
12. 298,065.866 298,065.866 ↓ 1.0 17,510,541 1

Seq Scan on session_clone2dd_cfa9_40bb_89ed_25482f835838 s_cf (cost=0.00..1,082,075.88 rows=17,508,088 width=95) (actual time=0.008..298,065.866 rows=17,510,541 loops=1)