explain.depesz.com

PostgreSQL's explain analyze made readable

Result: rsCi

Settings

Optimization(s) for this plan:

# exclusive inclusive rows x rows loops node
1. 0.000 24,181.093 ↓ 8.7 5,696,773 1

Gather Merge (cost=1,059,449.30..1,135,541.34 rows=652,172 width=12) (actual time=23,416.037..24,181.093 rows=5,696,773 loops=1)

  • Workers Planned: 2
  • Workers Launched: 2
2. 1,763.337 70,219.380 ↓ 5.8 1,898,924 3

Sort (cost=1,058,449.27..1,059,264.49 rows=326,086 width=12) (actual time=23,279.242..23,406.460 rows=1,898,924 loops=3)

  • Sort Key: mess2.date DESC
  • Sort Method: external merge Disk: 49496kB
  • Worker 0: Sort Method: external merge Disk: 47704kB
  • Worker 1: Sort Method: external merge Disk: 47760kB
3. 763.284 68,456.043 ↓ 5.8 1,898,924 3

Hash Join (cost=1,797.50..1,028,588.12 rows=326,086 width=12) (actual time=23.110..22,818.681 rows=1,898,924 loops=3)

  • Hash Cond: (mess2.conversation_id = "*VALUES*_1".column1)
4. 4,020.567 67,637.598 ↓ 5.7 1,959,822 3

Hash Join (cost=1.55..1,022,252.30 rows=341,070 width=16) (actual time=4.353..22,545.866 rows=1,959,822 loops=3)

  • Hash Cond: (mess2.bot_id = "*VALUES*".column1)
5. 63,616.974 63,616.974 ↑ 1.2 8,838,911 3

Parallel Seq Scan on messages mess2 (cost=0.00..977,519.69 rows=11,018,763 width=20) (actual time=4.089..21,205.658 rows=8,838,911 loops=3)

  • Filter: (bot_id <> 0)
6. 0.024 0.057 ↑ 1.0 62 3

Hash (cost=0.78..0.78 rows=62 width=4) (actual time=0.019..0.019 rows=62 loops=3)

  • Buckets: 1024 Batches: 1 Memory Usage: 11kB
7. 0.033 0.033 ↑ 1.0 62 3

Values Scan on "*VALUES*" (cost=0.00..0.78 rows=62 width=4) (actual time=0.002..0.011 rows=62 loops=3)

8. 24.969 55.161 ↑ 1.0 71,838 3

Hash (cost=897.98..897.98 rows=71,838 width=4) (actual time=18.386..18.387 rows=71,838 loops=3)

  • Buckets: 131072 Batches: 1 Memory Usage: 3550kB
9. 30.192 30.192 ↑ 1.0 71,838 3

Values Scan on "*VALUES*_1" (cost=0.00..897.98 rows=71,838 width=4) (actual time=0.001..10.064 rows=71,838 loops=3)

Planning time : 21.444 ms
Execution time : 24,346.278 ms