explain.depesz.com

PostgreSQL's explain analyze made readable

Result: D5QZ

Settings
# exclusive inclusive rows x rows loops node
1. 28.262 2,586.504 ↑ 1.9 76,234 1

Group (cost=335,329.58..338,953.20 rows=144,945 width=199) (actual time=2,540.913..2,586.504 rows=76,234 loops=1)

  • Group Key: facture.id_fact, edition_fact.mode_envoi, films.nom_film, societe_redressement.redressement, societe_redressement.liquidation, societe.id_societe, cinema.liv_ville, cinema.liv_dep, cinema.nom_cinema
2. 90.441 2,558.242 ↑ 1.4 105,564 1

Sort (cost=335,329.58..335,691.94 rows=144,945 width=199) (actual time=2,540.910..2,558.242 rows=105,564 loops=1)

  • Sort Key: facture.id_fact, edition_fact.mode_envoi, films.nom_film, societe_redressement.redressement, societe_redressement.liquidation, societe.id_societe, cinema.liv_ville, cinema.liv_dep, cinema.nom_cinema
  • Sort Method: external merge Disk: 13,808kB
3. 20.461 2,467.801 ↑ 1.4 105,564 1

Hash Left Join (cost=243,233.09..309,030.06 rows=144,945 width=199) (actual time=1,956.431..2,467.801 rows=105,564 loops=1)

  • Hash Cond: (facture.id_fact = avoir.id_fact)
4. 20.271 2,433.095 ↑ 1.1 104,817 1

Hash Left Join (cost=241,368.19..305,272.12 rows=115,476 width=199) (actual time=1,942.052..2,433.095 rows=104,817 loops=1)

  • Hash Cond: (bordereau.id_film = films.id_film)
5. 297.754 2,408.399 ↑ 1.1 104,817 1

Hash Right Join (cost=240,621.26..302,938.93 rows=115,476 width=185) (actual time=1,937.552..2,408.399 rows=104,817 loops=1)

  • Hash Cond: (encaissement.id_fact = facture.id_fact)
6. 174.139 174.139 ↑ 1.0 1,744,648 1

Seq Scan on encaissement (cost=0.00..38,011.48 rows=1,744,648 width=4) (actual time=0.020..174.139 rows=1,744,648 loops=1)

7. 38.508 1,936.506 ↑ 1.1 103,852 1

Hash (cost=236,132.81..236,132.81 rows=115,476 width=185) (actual time=1,936.506..1,936.506 rows=103,852 loops=1)

  • Buckets: 32,768 Batches: 8 Memory Usage: 2,069kB
8. 11.394 1,897.998 ↑ 1.1 103,852 1

Nested Loop (cost=77,637.63..236,132.81 rows=115,476 width=185) (actual time=614.268..1,897.998 rows=103,852 loops=1)

9. 0.017 0.017 ↑ 1.0 1 1

Index Only Scan using distributeur_pkey on distributeur (cost=0.27..8.29 rows=1 width=0) (actual time=0.015..0.017 rows=1 loops=1)

  • Index Cond: (id_societe = 42)
  • Heap Fetches: 1
10. 25.172 1,886.587 ↑ 1.1 103,852 1

Hash Left Join (cost=77,637.36..234,969.76 rows=115,476 width=185) (actual time=614.252..1,886.587 rows=103,852 loops=1)

  • Hash Cond: (facture.id_societe = societe.id_societe)
11. 30.456 1,858.842 ↑ 1.1 103,852 1

Hash Left Join (cost=77,218.64..232,967.10 rows=115,476 width=179) (actual time=611.652..1,858.842 rows=103,852 loops=1)

  • Hash Cond: (bordereau.screen_id = salles.screen_id)
12. 476.609 1,818.346 ↑ 1.1 103,852 1

Hash Join (cost=76,064.16..230,265.08 rows=115,476 width=152) (actual time=601.595..1,818.346 rows=103,852 loops=1)

  • Hash Cond: (bordereau.id_fact = facture.id_fact)
13. 740.498 740.498 ↑ 1.0 2,764,877 1

Seq Scan on bordereau (cost=0.00..114,102.77 rows=2,766,977 width=12) (actual time=0.007..740.498 rows=2,764,877 loops=1)

14. 18.781 601.239 ↑ 1.0 76,239 1

Hash (cost=73,513.27..73,513.27 rows=77,271 width=144) (actual time=601.239..601.239 rows=76,239 loops=1)

  • Buckets: 32,768 Batches: 4 Memory Usage: 2,181kB
15. 269.366 582.458 ↑ 1.0 76,239 1

Hash Right Join (cost=27,834.05..73,513.27 rows=77,271 width=144) (actual time=168.149..582.458 rows=76,239 loops=1)

  • Hash Cond: (edition_fact.id_fact = facture.id_fact)
16. 145.825 145.825 ↑ 1.0 1,555,354 1

Seq Scan on edition_fact (cost=0.00..25,460.54 rows=1,555,354 width=8) (actual time=0.011..145.825 rows=1,555,354 loops=1)

17. 15.844 167.267 ↑ 1.0 76,239 1

Hash (cost=25,283.17..25,283.17 rows=77,271 width=140) (actual time=167.267..167.267 rows=76,239 loops=1)

  • Buckets: 32,768 Batches: 4 Memory Usage: 2,116kB
18. 146.328 151.423 ↑ 1.0 76,239 1

Bitmap Heap Scan on facture (cost=1,447.28..25,283.17 rows=77,271 width=140) (actual time=6.723..151.423 rows=76,239 loops=1)

  • Recheck Cond: (id_distri = 42)
  • Heap Blocks: exact=13,266
19. 5.095 5.095 ↑ 1.0 76,239 1

Bitmap Index Scan on idx_facture_id_distri (cost=0.00..1,427.96 rows=77,271 width=0) (actual time=5.095..5.095 rows=76,239 loops=1)

  • Index Cond: (id_distri = 42)
20. 2.362 10.040 ↑ 1.0 16,876 1

Hash (cost=943.53..943.53 rows=16,876 width=35) (actual time=10.040..10.040 rows=16,876 loops=1)

  • Buckets: 32,768 Batches: 1 Memory Usage: 1,373kB
21. 3.429 7.678 ↑ 1.0 16,876 1

Hash Left Join (cost=393.73..943.53 rows=16,876 width=35) (actual time=3.103..7.678 rows=16,876 loops=1)

  • Hash Cond: (salles.id_cinema = cinema.id_cinema)
22. 1.167 1.167 ↑ 1.0 16,876 1

Seq Scan on salles (cost=0.00..317.76 rows=16,876 width=8) (actual time=0.014..1.167 rows=16,876 loops=1)

23. 1.039 3.082 ↑ 1.0 7,410 1

Hash (cost=301.10..301.10 rows=7,410 width=35) (actual time=3.082..3.082 rows=7,410 loops=1)

  • Buckets: 8,192 Batches: 1 Memory Usage: 577kB
24. 2.043 2.043 ↑ 1.0 7,410 1

Seq Scan on cinema (cost=0.00..301.10 rows=7,410 width=35) (actual time=0.006..2.043 rows=7,410 loops=1)

25. 0.469 2.573 ↑ 1.0 4,804 1

Hash (cost=358.17..358.17 rows=4,844 width=6) (actual time=2.573..2.573 rows=4,804 loops=1)

  • Buckets: 8,192 Batches: 1 Memory Usage: 233kB
26. 0.408 2.104 ↑ 1.0 4,804 1

Hash Right Join (cost=228.99..358.17 rows=4,844 width=6) (actual time=1.170..2.104 rows=4,804 loops=1)

  • Hash Cond: (societe_redressement.id_societe = societe.id_societe)
27. 0.563 0.563 ↑ 1.0 52 1

Seq Scan on societe_redressement (cost=0.00..128.46 rows=52 width=6) (actual time=0.011..0.563 rows=52 loops=1)

  • Filter: (id_distri = 42)
  • Rows Removed by Filter: 7,105
28. 0.475 1.133 ↑ 1.0 4,804 1

Hash (cost=168.44..168.44 rows=4,844 width=4) (actual time=1.133..1.133 rows=4,804 loops=1)

  • Buckets: 8,192 Batches: 1 Memory Usage: 233kB
29. 0.658 0.658 ↑ 1.0 4,804 1

Seq Scan on societe (cost=0.00..168.44 rows=4,844 width=4) (actual time=0.006..0.658 rows=4,804 loops=1)

30. 1.873 4.425 ↑ 1.0 13,197 1

Hash (cost=581.97..581.97 rows=13,197 width=22) (actual time=4.425..4.425 rows=13,197 loops=1)

  • Buckets: 16,384 Batches: 1 Memory Usage: 846kB
31. 2.552 2.552 ↑ 1.0 13,197 1

Seq Scan on films (cost=0.00..581.97 rows=13,197 width=22) (actual time=0.008..2.552 rows=13,197 loops=1)

32. 2.750 14.245 ↓ 1.0 26,562 1

Hash (cost=1,532.90..1,532.90 rows=26,560 width=4) (actual time=14.245..14.245 rows=26,562 loops=1)

  • Buckets: 32,768 Batches: 1 Memory Usage: 1,190kB
33. 5.119 11.495 ↓ 1.0 26,562 1

Hash Right Join (cost=626.10..1,532.90 rows=26,560 width=4) (actual time=4.366..11.495 rows=26,562 loops=1)

  • Hash Cond: (avoir_data.id_avoir = avoir.id_avoir)
34. 2.110 2.110 ↑ 1.0 26,560 1

Seq Scan on avoir_data (cost=0.00..541.60 rows=26,560 width=4) (actual time=0.005..2.110 rows=26,560 loops=1)

35. 2.224 4.266 ↑ 1.0 21,160 1

Hash (cost=361.60..361.60 rows=21,160 width=8) (actual time=4.266..4.266 rows=21,160 loops=1)

  • Buckets: 32,768 Batches: 1 Memory Usage: 1,083kB
36. 2.042 2.042 ↑ 1.0 21,160 1

Seq Scan on avoir (cost=0.00..361.60 rows=21,160 width=8) (actual time=0.008..2.042 rows=21,160 loops=1)

Planning time : 2.997 ms
Execution time : 2,591.978 ms