explain.depesz.com

PostgreSQL's explain analyze made readable

Result: krmP

Settings

Optimization(s) for this plan:

# exclusive inclusive rows x rows loops node
1. 4.277 15,054.318 ↓ 19.8 2,000 1

Hash Join (cost=48.52..391.22 rows=101 width=138) (actual time=0.449..15,054.318 rows=2,000 loops=1)

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

CTE a

3. 0.723 2.088 ↑ 1.0 2,000 1

Limit (cost=0.00..36.91 rows=2,000 width=41) (actual time=0.034..2.088 rows=2,000 loops=1)

4. 1.365 1.365 ↑ 88,981.8 2,000 1

Seq Scan on actuel a_1 (cost=0.00..3,284,292.64 rows=177,963,664 width=41) (actual time=0.032..1.365 rows=2,000 loops=1)

5. 5.960 15,049.868 ↓ 19.8 2,000 1

Hash Join (cost=3.02..344.33 rows=101 width=132) (actual time=0.248..15,049.868 rows=2,000 loops=1)

  • Hash Cond: ((t.code)::text = dt.code)
6. 5.410 15,043.868 ↓ 19.8 2,000 1

Nested Loop (cost=1.73..341.65 rows=101 width=148) (actual time=0.180..15,043.868 rows=2,000 loops=1)

7. 12.231 22.458 ↓ 19.8 2,000 1

Nested Loop (cost=1.29..73.93 rows=101 width=130) (actual time=0.147..22.458 rows=2,000 loops=1)

  • Join Filter: ((a.debit_descendant >= dcd.min_debit) AND ((a.debit_descendant)::double precision <= COALESCE(((dcd.max_debit)::double precision - '1'::double precision), 'Infinity'::double precision)))
  • Rows Removed by Join Filter: 12,000
8. 3.025 8.227 ↓ 15.4 2,000 1

Hash Join (cost=1.29..50.09 rows=130 width=98) (actual time=0.110..8.227 rows=2,000 loops=1)

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

CTE Scan on a (cost=0.00..40.00 rows=2,000 width=12) (actual time=0.036..5.180 rows=2,000 loops=1)

10. 0.012 0.022 ↑ 1.0 13 1

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

  • Buckets: 1,024 Batches: 1 Memory Usage: 9kB
11. 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)

12. 1.987 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)

13. 0.013 0.013 ↑ 1.0 7 1

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

14. 15,016.000 15,016.000 ↑ 1.0 1 2,000

Index Scan using immeuble_commune_id_idx on immeuble ai (cost=0.44..2.64 rows=1 width=22) (actual time=7.507..7.508 rows=1 loops=2,000)

  • Index Cond: (id = a.immeuble_id)
15. 0.018 0.040 ↑ 1.0 13 1

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

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

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

17. 0.083 0.173 ↑ 1.0 204 1

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

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

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

Planning time : 1.175 ms
Execution time : 15,055.411 ms