explain.depesz.com

PostgreSQL's explain analyze made readable

Result: cfrz

Settings
# exclusive inclusive rows x rows loops node
1. 0.050 260,765.065 ↓ 5.0 1,000 1

Limit (cost=5,414,833.36..5,414,833.86 rows=200 width=40) (actual time=260,764.956..260,765.065 rows=1,000 loops=1)

2. 0.719 260,765.015 ↓ 5.0 1,000 1

Sort (cost=5,414,833.36..5,414,833.86 rows=200 width=40) (actual time=260,764.955..260,765.015 rows=1,000 loops=1)

  • Sort Key: (max(g.last_update_time))
  • Sort Method: top-N heapsort Memory: 95kB
3. 0.875 260,764.296 ↓ 12.4 2,489 1

GroupAggregate (cost=5,414,803.92..5,414,825.71 rows=200 width=40) (actual time=260,763.074..260,764.296 rows=2,489 loops=1)

  • Group Key: g.delo_id
4. 1.450 260,763.421 ↑ 1.1 2,496 1

Sort (cost=5,414,803.92..5,414,810.52 rows=2,639 width=40) (actual time=260,763.066..260,763.421 rows=2,496 loops=1)

  • Sort Key: g.delo_id
  • Sort Method: quicksort Memory: 214kB
5. 0.204 260,761.971 ↑ 1.1 2,496 1

Subquery Scan on g (cost=5,414,601.17..5,414,653.95 rows=2,639 width=40) (actual time=260,761.260..260,761.971 rows=2,496 loops=1)

6. 1.889 260,761.767 ↑ 1.1 2,496 1

HashAggregate (cost=5,414,601.17..5,414,627.56 rows=2,639 width=40) (actual time=260,761.259..260,761.767 rows=2,496 loops=1)

  • Group Key: delo.last_update_time, delo.delo_id
7. 0.195 260,759.878 ↓ 1.5 4,000 1

Append (cost=1,340,832.29..5,414,587.97 rows=2,639 width=40) (actual time=82,763.836..260,759.878 rows=4,000 loops=1)

8. 6.944 82,770.861 ↑ 1.0 1,000 1

Limit (cost=1,340,832.29..1,340,834.79 rows=1,000 width=15) (actual time=82,763.836..82,770.861 rows=1,000 loops=1)

9. 30.533 82,763.917 ↑ 214.6 1,000 1

Sort (cost=1,340,832.29..1,341,368.68 rows=214,555 width=15) (actual time=82,763.835..82,763.917 rows=1,000 loops=1)

  • Sort Key: delo.last_update_time
  • Sort Method: top-N heapsort Memory: 95kB
10. 8.616 82,733.384 ↓ 1.0 221,233 1

Gather (cost=1,000.00..1,329,068.48 rows=214,555 width=15) (actual time=19.683..82,733.384 rows=221,233 loops=1)

  • Workers Planned: 6
  • Workers Launched: 6
11. 82,724.768 82,724.768 ↑ 1.1 31,605 7 / 7

Parallel Seq Scan on delo (cost=0.00..1,306,612.98 rows=35,759 width=15) (actual time=8.732..82,724.768 rows=31,605 loops=7)

  • Filter: (last_update_time >= '2020-06-15 12:39:06'::timestamp without time zone)
  • Rows Removed by Filter: 2,002,199
12. 12.632 45,304.361 ↓ 2.7 1,000 1

Limit (cost=857,098.32..857,099.24 rows=368 width=14) (actual time=45,291.651..45,304.361 rows=1,000 loops=1)

13. 35.799 45,291.729 ↓ 2.7 1,000 1

Sort (cost=857,098.32..857,099.24 rows=368 width=14) (actual time=45,291.649..45,291.729 rows=1,000 loops=1)

  • Sort Key: viol.last_update_time
  • Sort Method: top-N heapsort Memory: 95kB
14. 10.114 45,255.930 ↓ 915.2 336,794 1

Gather (cost=1,000.00..857,082.63 rows=368 width=14) (actual time=41.242..45,255.930 rows=336,794 loops=1)

  • Workers Planned: 6
  • Workers Launched: 6
15. 45,245.816 45,245.816 ↓ 788.7 48,113 7 / 7

Parallel Seq Scan on viol (cost=0.00..856,045.83 rows=61 width=14) (actual time=69.213..45,245.816 rows=48,113 loops=7)

  • Filter: (last_update_time >= '2020-06-15 12:39:06'::timestamp without time zone)
  • Rows Removed by Filter: 1,985,691
16. 5.722 61,586.633 ↓ 1.5 1,000 1

Limit (cost=1,521,062.64..1,521,064.31 rows=671 width=14) (actual time=61,580.764..61,586.633 rows=1,000 loops=1)

17. 40.136 61,580.911 ↓ 1.5 1,000 1

Sort (cost=1,521,062.64..1,521,064.31 rows=671 width=14) (actual time=61,580.762..61,580.911 rows=1,000 loops=1)

  • Sort Key: decis.last_update_time
  • Sort Method: top-N heapsort Memory: 95kB
18. 1.018 61,540.775 ↓ 441.6 296,298 1

Gather (cost=1,000.00..1,521,031.13 rows=671 width=14) (actual time=94.861..61,540.775 rows=296,298 loops=1)

  • Workers Planned: 6
  • Workers Launched: 6
19. 61,539.757 61,539.757 ↓ 377.9 42,328 7 / 7

Parallel Seq Scan on decis (cost=0.00..1,519,964.03 rows=112 width=14) (actual time=53.604..61,539.757 rows=42,328 loops=7)

  • Filter: (last_update_time >= '2020-06-15 12:39:06'::timestamp without time zone)
  • Rows Removed by Filter: 2,633,845
20. 6.484 71,097.828 ↓ 1.7 1,000 1

Limit (cost=1,695,535.35..1,695,536.85 rows=600 width=15) (actual time=71,091.282..71,097.828 rows=1,000 loops=1)

21. 9.324 71,091.344 ↓ 1.7 1,000 1

Sort (cost=1,695,535.35..1,695,536.85 rows=600 width=15) (actual time=71,091.280..71,091.344 rows=1,000 loops=1)

  • Sort Key: decis_ispoln.last_update_time
  • Sort Method: top-N heapsort Memory: 95kB
22. 14.533 71,082.020 ↓ 236.9 142,168 1

Gather (cost=1,000.00..1,695,507.66 rows=600 width=15) (actual time=6.162..71,082.020 rows=142,168 loops=1)

  • Workers Planned: 6
  • Workers Launched: 6
23. 71,067.487 71,067.487 ↓ 203.1 20,310 7 / 7

Parallel Seq Scan on decis_ispoln (cost=0.00..1,694,447.66 rows=100 width=15) (actual time=3.278..71,067.487 rows=20,310 loops=7)

  • Filter: (last_update_time >= '2020-06-15 12:39:06'::timestamp without time zone)
  • Rows Removed by Filter: 5,173,362
Planning time : 2.170 ms
Execution time : 260,765.240 ms