explain.depesz.com

PostgreSQL's explain analyze made readable

Result: CwSr

Settings
# exclusive inclusive rows x rows loops node
1. 43.699 13,183.771 ↑ 1.0 46,480,113 1

Seq Scan on tmp_x (cost=10,000,000,000.00..10,000,790,164.70 rows=46,490,771 width=14) (actual time=0.186..13,183.771 rows=46,480,113 loops=1)

  • Filter: (boardid <> 0)
  • Rows Removed by Filter: 206,726
  • JIT:
  • Functions: 27
  • Options: Inlining true, Optimization true, Expressions true, Deforming true
  • Timing: Generation 6.336 ms, Inlining 19.071 ms, Optimization 338.476 ms, Emission 195.039 ms, Total 558.922 ms
2. 315.951 13,140.072 ↑ 1.0 100,000 1

Hash (cost=331,662.12..331,662.12 rows=100,000 width=799) (actual time=13,140.047..13,140.072 rows=100,000 loops=1)

  • Buckets: 32,768 Batches: 8 Memory Usage: 8,345kB
3. 96.367 12,824.121 ↑ 1.0 100,000 1

Nested Loop (cost=74,309.44..331,662.12 rows=100,000 width=799) (actual time=11,944.991..12,824.121 rows=100,000 loops=1)

4. 197.747 12,027.754 ↑ 1.0 100,000 1

HashAggregate (cost=74,308.88..75,308.88 rows=100,000 width=32) (actual time=11,944.923..12,027.754 rows=100,000 loops=1)

  • Group Key: "ANY_subquery".post_id
5. 47.462 11,830.007 ↑ 1.0 100,000 1

Subquery Scan on ANY_subquery (cost=0.56..74,058.88 rows=100,000 width=32) (actual time=553.358..11,830.007 rows=100,000 loops=1)

6. 573.241 11,782.545 ↑ 1.0 100,000 1

Limit (cost=0.56..73,058.88 rows=100,000 width=4) (actual time=553.347..11,782.545 rows=100,000 loops=1)

7. 11,209.304 11,209.304 ↓ 0.0 100,000 1

Index Scan using "UQ_e55cc433639d0e21c3dbf637bce" on posts posts_1(cost=0.56..30355510.46 rows=41549700 width=4) (cost=0..0 rows=0 width=0) (actual time=0.099..11,209.304 rows=100,000 loops=1)

  • Filter: (board_id IS NULL)
  • Rows Removed by Filter: 3,765,619
8. 700.000 700.000 ↑ 1.0 1 100,000

Index Scan using "UQ_e55cc433639d0e21c3dbf637bce" on posts (cost=0.56..2.57 rows=1 width=767) (actual time=0.007..0.007 rows=1 loops=100,000)

  • Index Cond: (post_id = "ANY_subquery".post_id)
Planning time : 1.747 ms
Execution time : 98,263.842 ms