explain.depesz.com

PostgreSQL's explain analyze made readable

Result: IZP6 : Optimization for: Optimization for: plan #rsCi; plan #JlfUX

Settings

Optimization path:

# exclusive inclusive rows x rows loops node
1. 1,724.101 19,503.171 ↓ 7.3 5,696,773 1

Hash Join (cost=1,796.51..1,056,048.14 rows=782,680 width=4) (actual time=96.472..19,503.171 rows=5,696,773 loops=1)

  • Hash Cond: (mess2.conversation_id = "*VALUES*_1".column1)
2. 1,497.198 17,742.726 ↓ 7.2 5,879,466 1

Nested Loop (cost=0.56..1,043,355.47 rows=818,646 width=8) (actual time=59.428..17,742.726 rows=5,879,466 loops=1)

3. 0.288 0.288 ↑ 1.0 62 1

Values Scan on "*VALUES*" (cost=0.00..0.78 rows=62 width=4) (actual time=0.004..0.288 rows=62 loops=1)

4. 16,245.240 16,245.240 ↓ 7.2 94,830 62

Index Scan using id_direction_index on messages mess2 (cost=0.56..16,696.26 rows=13,204 width=12) (actual time=17.826..262.020 rows=94,830 loops=62)

  • Index Cond: (bot_id = "*VALUES*".column1)
5. 15.748 36.344 ↑ 1.0 71,838 1

Hash (cost=897.98..897.98 rows=71,838 width=4) (actual time=36.344..36.344 rows=71,838 loops=1)

  • Buckets: 131072 Batches: 1 Memory Usage: 3550kB
6. 20.596 20.596 ↑ 1.0 71,838 1

Values Scan on "*VALUES*_1" (cost=0.00..897.98 rows=71,838 width=4) (actual time=0.006..20.596 rows=71,838 loops=1)

Planning time : 222.595 ms
Execution time : 19,829.291 ms