explain.depesz.com

PostgreSQL's explain analyze made readable

Result: ONQq : Count Lines Added & Removed All Time -- FIS DB02

Settings
# exclusive inclusive rows x rows loops node
1. 3.011 5,565.220 ↑ 1.0 1 1

Aggregate (cost=5,683,117.87..5,683,117.88 rows=1 width=16) (actual time=5,565.220..5,565.220 rows=1 loops=1)

2. 0.000 5,562.209 ↓ 5,468.0 5,468 1

Nested Loop (cost=51,104.28..5,683,117.86 rows=1 width=24) (actual time=4,430.607..5,562.209 rows=5,468 loops=1)

  • Join Filter: ((c."position" <= ass.as_of) AND (ss.code_set_id = c.code_set_id))
  • Rows Removed by Join Filter: 9
3. 0.000 4,604.953 ↑ 300.7 5,477 1

Gather (cost=51,103.70..1,897,713.13 rows=1,646,976 width=40) (actual time=4,426.290..4,604.953 rows=5,477 loops=1)

  • Workers Planned: 4
  • Workers Launched: 4
4. 1.825 4,625.111 ↑ 376.0 1,095 5 / 5

Nested Loop (cost=50,103.70..1,732,015.53 rows=411,744 width=40) (actual time=4,372.904..4,625.111 rows=1,095 loops=5)

5. 10.789 4,409.683 ↑ 376.0 1,095 5 / 5

Parallel Hash Join (cost=50,102.99..730,765.54 rows=411,744 width=40) (actual time=4,371.487..4,409.683 rows=1,095 loops=5)

  • Hash Cond: (sm.sloc_set_id = ss.id)
6. 0.606 2,720.061 ↑ 376.0 1,095 5 / 5

Nested Loop (cost=0.71..679,582.43 rows=411,744 width=44) (actual time=2,683.920..2,720.061 rows=1,095 loops=5)

7. 2,681.556 2,681.556 ↓ 0.0 0 5 / 5

Parallel Seq Scan on analysis_sloc_sets ass (cost=0.00..87,692.99 rows=4 width=8) (actual time=2,681.550..2,681.556 rows=0 loops=5)

  • Filter: ((as_of IS NOT NULL) AND (analysis_id = 39,993,914))
  • Rows Removed by Filter: 1,572,972
8. 37.899 37.899 ↑ 55.6 5,477 1 / 5

Index Scan using index_sloc_metrics_on_sloc_set_id_language_id on sloc_metrics sm (cost=0.71..144,926.35 rows=304,601 width=36) (actual time=11.781..189.493 rows=5,477 loops=1)

  • Index Cond: (sloc_set_id = ass.sloc_set_id)
9. 174.982 1,678.833 ↑ 1.7 318,669 5 / 5

Parallel Hash (cost=43,310.46..43,310.46 rows=543,346 width=8) (actual time=1,678.833..1,678.833 rows=318,669 loops=5)

  • Buckets: 4,194,304 Batches: 1 Memory Usage: 95,200kB
10. 1,503.851 1,503.851 ↑ 1.7 318,669 5 / 5

Parallel Seq Scan on sloc_sets ss (cost=0.00..43,310.46 rows=543,346 width=8) (actual time=0.792..1,503.851 rows=318,669 loops=5)

11. 213.603 213.603 ↑ 1.0 1 5,477 / 5

Index Scan using diffs_pkey on diffs d (cost=0.71..2.43 rows=1 width=16) (actual time=0.195..0.195 rows=1 loops=5,477)

  • Index Cond: (id = sm.diff_id)
12. 1,013.245 1,013.245 ↑ 1.0 1 5,477

Index Scan using commits_pkey on commits c (cost=0.57..2.28 rows=1 width=16) (actual time=0.185..0.185 rows=1 loops=5,477)

  • Index Cond: (id = d.commit_id)
  • Filter: (("time" >= '1971-01-01 00:00:00'::timestamp without time zone) AND ("time" < timezone('utc'::text, now())))
Planning time : 141.407 ms
Execution time : 5,633.284 ms