explain.depesz.com

PostgreSQL's explain analyze made readable

Result: 1D3k

Settings

Optimization(s) for this plan:

# exclusive inclusive rows x rows loops node
1. 2,045.308 12,777.290 ↓ 46.2 5,218,810 1

Hash Join (cost=594,337.28..642,956.84 rows=112,936 width=513) (actual time=8,191.056..12,777.290 rows=5,218,810 loops=1)

  • Hash Cond: (i1_.id_jdd = i2_.id_jdd)
2. 2,540.435 10,717.918 ↓ 17.1 400,645 1

Hash Join (cost=593,625.11..640,880.85 rows=23,442 width=513) (actual time=8,176.975..10,717.918 rows=400,645 loops=1)

  • Hash Cond: (g.cd_ref = i0_.cd_nom)
3. 1.194 1.398 ↑ 1.1 2,563 1

Bitmap Heap Scan on vm_requeteur_groupes g (cost=54.51..2,622.39 rows=2,850 width=4) (actual time=0.215..1.398 rows=2,563 loops=1)

  • Recheck Cond: (gid = 12)
4. 0.204 0.204 ↑ 1.1 2,563 1

Bitmap Index Scan on vm_requeteur_groupes_gid_idx (cost=0.00..53.80 rows=2,850 width=0) (actual time=0.204..0.204 rows=2,563 loops=1)

  • Index Cond: (gid = 12)
5. 609.304 8,176.085 ↓ 1.1 436,721 1

Hash (cost=561,566.77..561,566.77 rows=405,586 width=517) (actual time=8,176.085..8,176.085 rows=436,721 loops=1)

  • Buckets: 1024 Batches: 8192 (originally 256) Memory Usage: 3483kB
6. 3,970.972 7,566.781 ↓ 1.1 436,721 1

Hash Join (cost=190,833.30..561,566.77 rows=405,586 width=517) (actual time=1,352.001..7,566.781 rows=436,721 loops=1)

  • Hash Cond: (i0_.id_releve = i1_.rid)
7. 2,258.559 2,258.559 ↑ 1.0 4,124,641 1

Seq Scan on vm_requeteur_observations i0_ (cost=0.00..187,835.41 rows=4,124,641 width=105) (actual time=0.025..2,258.559 rows=4,124,641 loops=1)

8. 366.521 1,337.250 ↑ 1.0 395,935 1

Hash (cost=164,617.11..164,617.11 rows=395,935 width=412) (actual time=1,337.250..1,337.250 rows=395,935 loops=1)

  • Buckets: 1024 Batches: 256 Memory Usage: 595kB
9. 899.582 970.729 ↑ 1.0 395,935 1

Bitmap Heap Scan on vm_requeteur_releves i1_ (cost=7,416.92..164,617.11 rows=395,935 width=412) (actual time=72.934..970.729 rows=395,935 loops=1)

  • Recheck Cond: ((departement)::text = '33'::text)
  • Rows Removed by Index Recheck: 1140119
10. 71.147 71.147 ↑ 1.0 395,935 1

Bitmap Index Scan on vm_requeteur_releves_departement_idx (cost=0.00..7,317.94 rows=395,935 width=0) (actual time=71.147..71.147 rows=395,935 loops=1)

  • Index Cond: ((departement)::text = '33'::text)
11. 4.062 14.064 ↓ 1.6 10,386 1

Hash (cost=630.51..630.51 rows=6,533 width=4) (actual time=14.064..14.064 rows=10,386 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 366kB
12. 4.170 10.002 ↓ 1.6 10,386 1

Hash Join (cost=400.50..630.51 rows=6,533 width=4) (actual time=2.526..10.002 rows=10,386 loops=1)

  • Hash Cond: (i2_.id_ca = i3_.id_ca)
13. 2.039 4.464 ↑ 1.0 3,279 1

Hash Right Join (cost=257.51..405.55 rows=3,328 width=8) (actual time=1.152..4.464 rows=3,279 loops=1)

  • Hash Cond: (i5_.id_jdd = i2_.id_jdd)
14. 1.288 1.288 ↑ 1.0 3,279 1

Seq Scan on jdd_contact_donnees i5_ (cost=0.00..102.28 rows=3,328 width=4) (actual time=0.005..1.288 rows=3,279 loops=1)

15. 0.320 1.137 ↑ 1.1 1,226 1

Hash (cost=240.56..240.56 rows=1,356 width=8) (actual time=1.137..1.137 rows=1,226 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 48kB
16. 0.817 0.817 ↑ 1.1 1,226 1

Seq Scan on jdd i2_ (cost=0.00..240.56 rows=1,356 width=8) (actual time=0.003..0.817 rows=1,226 loops=1)

17. 0.283 1.368 ↓ 1.2 1,044 1

Hash (cost=131.73..131.73 rows=901 width=4) (actual time=1.368..1.368 rows=1,044 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 37kB
18. 0.494 1.085 ↓ 1.2 1,044 1

Hash Right Join (cost=83.33..131.73 rows=901 width=4) (actual time=0.340..1.085 rows=1,044 loops=1)

  • Hash Cond: (i4_.id_ca = i3_.id_ca)
19. 0.267 0.267 ↓ 1.1 964 1

Seq Scan on ca_contact i4_ (cost=0.00..36.01 rows=901 width=4) (actual time=0.006..0.267 rows=964 loops=1)

20. 0.105 0.324 ↑ 1.1 409 1

Hash (cost=77.59..77.59 rows=459 width=4) (actual time=0.324..0.324 rows=409 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 15kB
21. 0.219 0.219 ↑ 1.1 409 1

Seq Scan on ca i3_ (cost=0.00..77.59 rows=459 width=4) (actual time=0.005..0.219 rows=409 loops=1)

Total runtime : 13,626.778 ms