explain.depesz.com

PostgreSQL's explain analyze made readable

Result: sQMg

Settings
# exclusive inclusive rows x rows loops node
1. 88.665 535.990 ↓ 1.0 99,942 1

Sort (cost=160,819.51..161,068.40 rows=99,556 width=1,114) (actual time=508.812..535.990 rows=99,942 loops=1)

  • Sort Key: nt_queue_message.priority
  • Sort Method: external merge Disk: 12736kB
  • Functions: 39
  • Options: Inlining false, Optimization false, Expressions true, Deforming true
  • Timing: Generation 5.021 ms, Inlining 0.000 ms, Optimization 1.343 ms, Emission 27.396 ms, Total 33.760 ms
2. 37.265 447.325 ↓ 1.0 99,942 1

Hash Join (cost=8,532.56..55,233.76 rows=99,556 width=1,114) (actual time=119.543..447.325 rows=99,942 loops=1)

  • Hash Cond: (nt_queue_message.to_entity_id = overseeent6_.entity_id)
3. 18.747 380.932 ↓ 1.0 99,942 1

Nested Loop (cost=8,521.44..54,690.26 rows=99,556 width=606) (actual time=90.408..380.932 rows=99,942 loops=1)

4. 0.003 0.059 ↑ 1.0 1 1

Nested Loop (cost=0.43..18.89 rows=1 width=532) (actual time=0.053..0.059 rows=1 loops=1)

5. 0.003 0.050 ↑ 1.0 1 1

Nested Loop (cost=0.29..18.02 rows=1 width=20) (actual time=0.044..0.050 rows=1 loops=1)

6. 0.004 0.040 ↑ 1.0 1 1

Nested Loop (cost=0.14..9.64 rows=1 width=20) (actual time=0.034..0.040 rows=1 loops=1)

7. 0.017 0.017 ↑ 1.0 1 1

Seq Scan on nt_queue queueentit2_ (cost=0.00..1.46 rows=1 width=20) (actual time=0.015..0.017 rows=1 loops=1)

  • Filter: ((queue_id = 37) AND (outbox_id = 1))
  • Rows Removed by Filter: 30
8. 0.019 0.019 ↑ 1.0 1 1

Index Scan using pk_nt_outbox on nt_outbox outboxenti3_ (cost=0.14..8.16 rows=1 width=8) (actual time=0.016..0.019 rows=1 loops=1)

  • Index Cond: (outbox_id = 1)
9. 0.007 0.007 ↑ 1.0 1 1

Index Scan using pk_nt_transmitter on nt_transmitter transmitte4_ (cost=0.14..8.16 rows=1 width=8) (actual time=0.007..0.007 rows=1 loops=1)

  • Index Cond: (transmitter_id = outboxenti3_.transmitter_id)
10. 0.006 0.006 ↑ 1.0 1 1

Index Scan using pk_ovs_entity on ovs_entity overseeent5_ (cost=0.14..0.84 rows=1 width=520) (actual time=0.006..0.006 rows=1 loops=1)

  • Index Cond: (entity_id = transmitte4_.station_id)
11. 108.856 362.126 ↓ 1.0 99,942 1

Hash Join (cost=8,521.01..53,675.81 rows=99,556 width=82) (actual time=90.350..362.126 rows=99,942 loops=1)

  • Hash Cond: (nt_queue_message.message_id = nt_message.message_id)
12. 174.002 182.485 ↓ 1.0 99,942 1

Bitmap Heap Scan on nt_queue_message (cost=2,967.99..45,522.44 rows=99,556 width=32) (actual time=19.427..182.485 rows=99,942 loops=1)

  • Recheck Cond: (queue_id = 37)
  • Heap Blocks: exact=39978
13. 8.483 8.483 ↓ 1.0 99,942 1

Bitmap Index Scan on idx_ntqm_01 (cost=0.00..2,943.10 rows=99,556 width=0) (actual time=8.483..8.483 rows=99,942 loops=1)

  • Index Cond: (queue_id = 37)
14. 34.020 70.785 ↑ 1.0 100,001 1

Hash (cost=3,326.01..3,326.01 rows=100,001 width=54) (actual time=70.785..70.785 rows=100,001 loops=1)

  • Buckets: 65536 Batches: 4 Memory Usage: 2663kB
15. 36.765 36.765 ↑ 1.0 100,001 1

Seq Scan on nt_message (cost=0.00..3,326.01 rows=100,001 width=54) (actual time=0.018..36.765 rows=100,001 loops=1)

16. 0.006 29.128 ↑ 50.0 1 1

Hash (cost=10.50..10.50 rows=50 width=520) (actual time=29.128..29.128 rows=1 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 9kB
17. 29.122 29.122 ↑ 50.0 1 1

Seq Scan on ovs_entity overseeent6_ (cost=0.00..10.50 rows=50 width=520) (actual time=29.119..29.122 rows=1 loops=1)

Planning time : 1.174 ms
Execution time : 549.628 ms