explain.depesz.com

PostgreSQL's explain analyze made readable

Result: CmhX

Settings
# exclusive inclusive rows x rows loops node
1. 92.378 550.767 ↓ 1.0 99,942 1

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

  • Sort Key: queuemessa0_.priority
  • Sort Method: external merge Disk: 12736kB
  • Functions: 39
  • Options: Inlining false, Optimization false, Expressions true, Deforming true
  • Timing: Generation 5.220 ms, Inlining 0.000 ms, Optimization 1.182 ms, Emission 26.638 ms, Total 33.040 ms
2. 37.442 458.389 ↓ 1.0 99,942 1

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

  • Hash Cond: (queuemessa0_.to_entity_id = overseeent6_.entity_id)
3. 17.906 392.716 ↓ 1.0 99,942 1

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

4. 0.003 0.057 ↑ 1.0 1 1

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

5. 0.003 0.048 ↑ 1.0 1 1

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

6. 0.003 0.038 ↑ 1.0 1 1

Nested Loop (cost=0.14..9.64 rows=1 width=20) (actual time=0.032..0.038 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.018 0.018 ↑ 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.015..0.018 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. 106.602 374.753 ↓ 1.0 99,942 1

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

  • Hash Cond: (queuemessa0_.message_id = messageent1_.message_id)
12. 178.388 188.702 ↓ 1.0 99,942 1

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

  • Recheck Cond: (queue_id = 37)
  • Heap Blocks: exact=39978
13. 10.314 10.314 ↓ 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=10.314..10.314 rows=99,942 loops=1)

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

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

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

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

16. 0.007 28.231 ↑ 50.0 1 1

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

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

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

Planning time : 1.202 ms
Execution time : 564.678 ms