explain.depesz.com

PostgreSQL's explain analyze made readable

Result: SJcc : Optimization for: Optimization for: Optimization for: plan #krmP; plan #wmhC; plan #m1F2

Settings

Optimization path:

Optimization(s) for this plan:

# exclusive inclusive rows x rows loops node
1. 0.970 13.822 ↓ 18.6 1,878 1

Hash Join (cost=3,235.49..3,304.97 rows=101 width=156) (actual time=0.408..13.822 rows=1,878 loops=1)

  • Hash Cond: (a.operateur_id = dimo.bk_operateur)
2.          

CTE a

3. 0.352 3.985 ↑ 1.0 2,000 1

Limit (cost=1,298.35..3,224.14 rows=2,000 width=30) (actual time=0.032..3.985 rows=2,000 loops=1)

4. 0.997 3.633 ↑ 88,981.8 2,000 1

Merge Join (cost=1,298.35..171,361,436.30 rows=177,963,664 width=30) (actual time=0.031..3.633 rows=2,000 loops=1)

  • Merge Cond: (ai.id = a_1.immeuble_id)
5. 0.395 0.395 ↑ 90,134.4 278 1

Index Scan using immeuble_commune_id_idx on immeuble ai (cost=0.44..19,150,122.77 rows=25,057,372 width=22) (actual time=0.015..0.395 rows=278 loops=1)

6. 2.241 2.241 ↑ 88,981.8 2,000 1

Index Scan using eligiblite_immeuble_id_idx on actuel a_1 (cost=0.57..149,938,011.37 rows=177,963,664 width=12) (actual time=0.009..2.241 rows=2,000 loops=1)

7. 4.143 12.602 ↓ 18.6 1,878 1

Nested Loop (cost=2.76..70.85 rows=101 width=150) (actual time=0.121..12.602 rows=1,878 loops=1)

  • Join Filter: ((a.debit_descendant >= dcd.min_debit) AND (a.debit_descendant <= (dcd.max_debit - 1)))
  • Rows Removed by Join Filter: 12,122
8. 1.150 6.459 ↓ 15.4 2,000 1

Hash Join (cost=2.76..51.56 rows=130 width=118) (actual time=0.105..6.459 rows=2,000 loops=1)

  • Hash Cond: (a.techno_id = t.id)
9. 5.251 5.251 ↑ 1.0 2,000 1

CTE Scan on a (cost=0.00..40.00 rows=2,000 width=48) (actual time=0.035..5.251 rows=2,000 loops=1)

10. 0.008 0.058 ↑ 1.0 13 1

Hash (cost=2.60..2.60 rows=13 width=74) (actual time=0.058..0.058 rows=13 loops=1)

  • Buckets: 1,024 Batches: 1 Memory Usage: 9kB
11. 0.021 0.050 ↑ 1.0 13 1

Hash Join (cost=1.29..2.60 rows=13 width=74) (actual time=0.037..0.050 rows=13 loops=1)

  • Hash Cond: ((t.code)::text = dt.code)
12. 0.011 0.011 ↑ 1.0 13 1

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

13. 0.008 0.018 ↑ 1.0 13 1

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

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

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

15. 1.988 2.000 ↑ 1.0 7 2,000

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

16. 0.012 0.012 ↑ 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.012 rows=7 loops=1)

17. 0.098 0.250 ↑ 1.0 204 1

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

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

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

Planning time : 1.436 ms
Execution time : 14.230 ms