explain.depesz.com

PostgreSQL's explain analyze made readable

Result: FMoU

Settings
# exclusive inclusive rows x rows loops node
1. 3.436 3,582.520 ↓ 1.0 660 1

Finalize GroupAggregate (cost=94,193.66..94,365.11 rows=633 width=44) (actual time=3,578.236..3,582.520 rows=660 loops=1)

  • Group Key: l.post_id
2.          

Initplan (for Finalize GroupAggregate)

3. 0.185 1,226.743 ↑ 1.0 1 1

Aggregate (cost=31,453.98..31,453.99 rows=1 width=8) (actual time=1,226.743..1,226.743 rows=1 loops=1)

4. 0.000 1,226.558 ↓ 1.0 660 1

Finalize GroupAggregate (cost=31,285.69..31,446.06 rows=633 width=24) (actual time=1,224.094..1,226.558 rows=660 loops=1)

  • Group Key: l_1.post_id
5. 0.000 1,226.589 ↓ 1.4 1,779 1

Gather Merge (cost=31,285.69..31,433.40 rows=1,266 width=24) (actual time=1,224.083..1,226.589 rows=1,779 loops=1)

  • Workers Planned: 2
  • Workers Launched: 2
6. 2.838 3,631.548 ↑ 1.1 593 3

Sort (cost=30,285.67..30,287.25 rows=633 width=24) (actual time=1,209.867..1,210.516 rows=593 loops=3)

  • Sort Key: l_1.post_id
  • Sort Method: quicksort Memory: 71kB
  • Worker 0: Sort Method: quicksort Memory: 71kB
  • Worker 1: Sort Method: quicksort Memory: 71kB
7. 1,851.354 3,628.710 ↑ 1.1 593 3

Partial HashAggregate (cost=30,249.89..30,256.22 rows=633 width=24) (actual time=1,209.379..1,209.570 rows=593 loops=3)

  • Group Key: l_1.post_id
8. 1,777.356 1,777.356 ↑ 1.2 489,295 3

Parallel Seq Scan on likes l_1 (cost=0.00..27,191.93 rows=611,592 width=16) (actual time=1.625..592.452 rows=489,295 loops=3)

9. 0.151 1,095.963 ↑ 1.0 1 1

Aggregate (cost=31,453.98..31,453.99 rows=1 width=8) (actual time=1,095.962..1,095.963 rows=1 loops=1)

10. 0.620 1,095.812 ↓ 1.0 660 1

Finalize GroupAggregate (cost=31,285.69..31,446.06 rows=633 width=24) (actual time=1,094.368..1,095.812 rows=660 loops=1)

  • Group Key: l_2.post_id
11. 0.000 1,095.192 ↓ 1.4 1,755 1

Gather Merge (cost=31,285.69..31,433.40 rows=1,266 width=24) (actual time=1,094.358..1,095.192 rows=1,755 loops=1)

  • Workers Planned: 2
  • Workers Launched: 2
12. 1.290 3,261.747 ↑ 1.1 585 3

Sort (cost=30,285.67..30,287.25 rows=633 width=24) (actual time=1,087.127..1,087.249 rows=585 loops=3)

  • Sort Key: l_2.post_id
  • Sort Method: quicksort Memory: 71kB
  • Worker 0: Sort Method: quicksort Memory: 70kB
  • Worker 1: Sort Method: quicksort Memory: 69kB
13. 1,809.903 3,260.457 ↑ 1.1 585 3

Partial HashAggregate (cost=30,249.89..30,256.22 rows=633 width=24) (actual time=1,086.622..1,086.819 rows=585 loops=3)

  • Group Key: l_2.post_id
14. 1,450.554 1,450.554 ↑ 1.2 489,295 3

Parallel Seq Scan on likes l_2 (cost=0.00..27,191.93 rows=611,592 width=16) (actual time=1.770..483.518 rows=489,295 loops=3)

15. 0.000 1,256.378 ↓ 1.4 1,774 1

Gather Merge (cost=31,285.69..31,433.40 rows=1,266 width=24) (actual time=1,255.494..1,256.378 rows=1,774 loops=1)

  • Workers Planned: 2
  • Workers Launched: 2
16. 2.760 3,712.722 ↑ 1.1 591 3

Sort (cost=30,285.67..30,287.25 rows=633 width=24) (actual time=1,236.950..1,237.574 rows=591 loops=3)

  • Sort Key: l.post_id
  • Sort Method: quicksort Memory: 72kB
  • Worker 0: Sort Method: quicksort Memory: 71kB
  • Worker 1: Sort Method: quicksort Memory: 69kB
17. 1,855.755 3,709.962 ↑ 1.1 591 3

Partial HashAggregate (cost=30,249.89..30,256.22 rows=633 width=24) (actual time=1,236.458..1,236.654 rows=591 loops=3)

  • Group Key: l.post_id
18. 1,854.207 1,854.207 ↑ 1.2 489,295 3

Parallel Seq Scan on likes l (cost=0.00..27,191.93 rows=611,592 width=16) (actual time=2.191..618.069 rows=489,295 loops=3)

Planning time : 5.587 ms
Execution time : 3,593.022 ms