explain.depesz.com

PostgreSQL's explain analyze made readable

Result: Lnhu

Settings
# exclusive inclusive rows x rows loops node
1. 0.016 0.345 ↑ 1.0 1 1

Aggregate (cost=638.25..638.26 rows=1 width=8) (actual time=0.344..0.345 rows=1 loops=1)

2. 0.016 0.329 ↓ 1.1 23 1

Hash Join (cost=316.97..638.09 rows=21 width=16) (actual time=0.207..0.329 rows=23 loops=1)

  • Hash Cond: (rtpezoav.zo_id = rtpezoav_1.zo_id)
3. 0.018 0.165 ↑ 1.0 23 1

Hash Semi Join (cost=1.08..321.90 rows=23 width=20) (actual time=0.052..0.165 rows=23 loops=1)

  • Hash Cond: (rtpezoav.zo_id = (unnest('{354024,354040,354041,354042,354043,354056,354062,354063,354064,354065,354038,354039,354036,354066,354035,354034,354033,354031,354030,354029,354028,354027,354026}'::integer[])))
4. 0.004 0.130 ↑ 1.2 23 1

Append (cost=0.43..320.92 rows=27 width=16) (actual time=0.027..0.130 rows=23 loops=1)

5. 0.109 0.109 ↑ 1.1 23 1

Index Scan using rtpezoav_unique on rtpezoav (cost=0.43..152.30 rows=26 width=16) (actual time=0.026..0.109 rows=23 loops=1)

  • Index Cond: ((pe_id = 4) AND (zo_id = ANY ('{354024,354040,354041,354042,354043,354056,354062,354063,354064,354065,354038,354039,354036,354066,354035,354034,354033,354031,354030,354029,354028,354027,354026}'::integer[])) AND (ad_id = 1,096))
6. 0.000 0.017 ↓ 0.0 0 1

Subquery Scan on *SELECT* 2 (cost=0.86..168.49 rows=1 width=16) (actual time=0.017..0.017 rows=0 loops=1)

7. 0.000 0.017 ↓ 0.0 0 1

Nested Loop Anti Join (cost=0.86..168.48 rows=1 width=56) (actual time=0.017..0.017 rows=0 loops=1)

  • Join Filter: (av_1.pe_id = rtpe.id)
8. 0.002 0.017 ↓ 0.0 0 1

Nested Loop (cost=0.43..152.01 rows=2 width=20) (actual time=0.016..0.017 rows=0 loops=1)

9. 0.009 0.009 ↑ 1.0 1 1

Seq Scan on rtpe (cost=0.00..1.30 rows=1 width=8) (actual time=0.006..0.009 rows=1 loops=1)

  • Filter: (id = 4)
  • Rows Removed by Filter: 23
10. 0.006 0.006 ↓ 0.0 0 1

Index Scan using rtpezoav_unique on rtpezoav av (cost=0.43..150.46 rows=25 width=20) (actual time=0.006..0.006 rows=0 loops=1)

  • Index Cond: ((pe_id = rtpe.baseline_id) AND (zo_id = ANY ('{354024,354040,354041,354042,354043,354056,354062,354063,354064,354065,354038,354039,354036,354066,354035,354034,354033,354031,354030,354029,354028,354027,354026}'::integer[])) AND (ad_id = 1,096))
11. 0.000 0.000 ↓ 0.0 0

Index Only Scan using rtpezoav_unique on rtpezoav av_1 (cost=0.43..8.46 rows=1 width=12) (never executed)

  • Index Cond: ((pe_id = 4) AND (zo_id = av.zo_id) AND (ad_id = av.ad_id) AND (ad_id = 1,096))
  • Heap Fetches: 0
12. 0.009 0.017 ↑ 1.0 23 1

Hash (cost=0.36..0.36 rows=23 width=4) (actual time=0.016..0.017 rows=23 loops=1)

  • Buckets: 1,024 Batches: 1 Memory Usage: 9kB
13. 0.007 0.008 ↑ 1.0 23 1

ProjectSet (cost=0.00..0.13 rows=23 width=4) (actual time=0.004..0.008 rows=23 loops=1)

14. 0.001 0.001 ↑ 1.0 1 1

Result (cost=0.00..0.01 rows=1 width=0) (actual time=0.001..0.001 rows=1 loops=1)

15. 0.009 0.148 ↑ 1.1 23 1

Hash (cost=315.58..315.58 rows=25 width=16) (actual time=0.148..0.148 rows=23 loops=1)

  • Buckets: 1,024 Batches: 1 Memory Usage: 10kB
16. 0.003 0.139 ↑ 1.1 23 1

Append (cost=0.43..315.58 rows=25 width=16) (actual time=0.012..0.139 rows=23 loops=1)

17. 0.100 0.100 ↑ 1.0 23 1

Index Scan using rtpezoav_unique on rtpezoav rtpezoav_1 (cost=0.43..148.61 rows=24 width=16) (actual time=0.012..0.100 rows=23 loops=1)

  • Index Cond: ((pe_id = 4) AND (zo_id = ANY ('{354024,354040,354041,354042,354043,354056,354062,354063,354064,354065,354038,354039,354036,354066,354035,354034,354033,354031,354030,354029,354028,354027,354026}'::integer[])) AND (ad_id = 1,072))
18. 0.010 0.036 ↓ 0.0 0 1

Subquery Scan on *SELECT* 2_1 (cost=0.86..166.84 rows=1 width=16) (actual time=0.036..0.036 rows=0 loops=1)

19. 0.001 0.026 ↓ 0.0 0 1

Nested Loop Anti Join (cost=0.86..166.83 rows=1 width=56) (actual time=0.026..0.026 rows=0 loops=1)

  • Join Filter: (av_1_1.pe_id = rtpe_1.id)
20. 0.002 0.025 ↓ 0.0 0 1

Nested Loop (cost=0.43..150.15 rows=2 width=20) (actual time=0.025..0.025 rows=0 loops=1)

21. 0.016 0.016 ↑ 1.0 1 1

Seq Scan on rtpe rtpe_1 (cost=0.00..1.30 rows=1 width=8) (actual time=0.013..0.016 rows=1 loops=1)

  • Filter: (id = 4)
  • Rows Removed by Filter: 23
22. 0.007 0.007 ↓ 0.0 0 1

Index Scan using rtpezoav_unique on rtpezoav av_2 (cost=0.43..148.61 rows=24 width=20) (actual time=0.007..0.007 rows=0 loops=1)

  • Index Cond: ((pe_id = rtpe_1.baseline_id) AND (zo_id = ANY ('{354024,354040,354041,354042,354043,354056,354062,354063,354064,354065,354038,354039,354036,354066,354035,354034,354033,354031,354030,354029,354028,354027,354026}'::integer[])) AND (ad_id = 1,072))
23. 0.000 0.000 ↓ 0.0 0

Index Only Scan using rtpezoav_unique on rtpezoav av_1_1 (cost=0.43..8.46 rows=1 width=12) (never executed)

  • Index Cond: ((pe_id = 4) AND (zo_id = av_2.zo_id) AND (ad_id = av_2.ad_id) AND (ad_id = 1,072))
  • Heap Fetches: 0
Planning time : 2.660 ms
Execution time : 0.892 ms