explain.depesz.com

PostgreSQL's explain analyze made readable

Result: ni6g : Optimization for: test 2; plan #OnD8

Settings

Optimization path:

# exclusive inclusive rows x rows loops node
1. 0.176 12.380 ↑ 1.0 1,000 1

Limit (cost=11.61..2,274.41 rows=1,000 width=138) (actual time=0.293..12.380 rows=1,000 loops=1)

2. 1.174 12.204 ↑ 139,800.3 1,000 1

Nested Loop (cost=11.61..316,339,430.38 rows=139,800,345 width=138) (actual time=0.292..12.204 rows=1,000 loops=1)

3. 2.738 6.030 ↑ 139,800.3 1,000 1

Nested Loop (cost=11.17..35,540,219.00 rows=139,800,345 width=120) (actual time=0.271..6.030 rows=1,000 loops=1)

  • Join Filter: ((a.debit_descendant >= dcd.min_debit) AND ((a.debit_descendant <= (dcd.max_debit - 1)) OR (dcd.max_debit IS NULL)))
  • Rows Removed by Join Filter: 6,000
4. 0.655 2.292 ↑ 177,963.7 1,000 1

Hash Join (cost=11.17..10,625,304.96 rows=177,963,664 width=88) (actual time=0.250..2.292 rows=1,000 loops=1)

  • Hash Cond: ((t.code)::text = dt.code)
5. 0.515 1.611 ↑ 177,963.7 1,000 1

Hash Join (cost=9.88..8,178,303.28 rows=177,963,664 width=104) (actual time=0.208..1.611 rows=1,000 loops=1)

  • Hash Cond: (a.operateur_id = dimo.bk_operateur)
6. 0.720 0.941 ↑ 177,963.7 1,000 1

Hash Join (cost=1.29..5,731,294.31 rows=177,963,664 width=98) (actual time=0.045..0.941 rows=1,000 loops=1)

  • Hash Cond: (a.techno_id = t.id)
7. 0.202 0.202 ↑ 177,963.7 1,000 1

Seq Scan on actuel a (cost=0.00..3,284,292.64 rows=177,963,664 width=12) (actual time=0.011..0.202 rows=1,000 loops=1)

8. 0.009 0.019 ↑ 1.0 13 1

Hash (cost=1.13..1.13 rows=13 width=90) (actual time=0.019..0.019 rows=13 loops=1)

  • Buckets: 1,024 Batches: 1 Memory Usage: 9kB
9. 0.010 0.010 ↑ 1.0 13 1

Seq Scan on techno t (cost=0.00..1.13 rows=13 width=90) (actual time=0.006..0.010 rows=13 loops=1)

10. 0.063 0.155 ↑ 1.0 204 1

Hash (cost=6.04..6.04 rows=204 width=12) (actual time=0.155..0.155 rows=204 loops=1)

  • Buckets: 1,024 Batches: 1 Memory Usage: 18kB
11. 0.092 0.092 ↑ 1.0 204 1

Seq Scan on d_operateur dimo (cost=0.00..6.04 rows=204 width=12) (actual time=0.010..0.092 rows=204 loops=1)

12. 0.010 0.026 ↑ 1.0 13 1

Hash (cost=1.13..1.13 rows=13 width=36) (actual time=0.026..0.026 rows=13 loops=1)

  • Buckets: 1,024 Batches: 1 Memory Usage: 9kB
13. 0.016 0.016 ↑ 1.0 13 1

Seq Scan on d_techno dt (cost=0.00..1.13 rows=13 width=36) (actual time=0.011..0.016 rows=13 loops=1)

14. 0.991 1.000 ↑ 1.0 7 1,000

Materialize (cost=0.00..1.10 rows=7 width=44) (actual time=0.000..0.001 rows=7 loops=1,000)

15. 0.009 0.009 ↑ 1.0 7 1

Seq Scan on d_classe_debit dcd (cost=0.00..1.07 rows=7 width=44) (actual time=0.006..0.009 rows=7 loops=1)

16. 5.000 5.000 ↑ 1.0 1 1,000

Index Scan using immeuble_commune_id_idx on immeuble ai (cost=0.44..2.00 rows=1 width=22) (actual time=0.005..0.005 rows=1 loops=1,000)

  • Index Cond: (id = a.immeuble_id)
Planning time : 2.183 ms
Execution time : 12.620 ms