explain.depesz.com

PostgreSQL's explain analyze made readable

Result: f5Dn5

Settings
# exclusive inclusive rows x rows loops node
1. 28.296 2,220.719 ↑ 1.5 76,234 1

Group (cost=311,033.34..313,920.24 rows=115,476 width=199) (actual time=2,174.555..2,220.719 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. 89.621 2,192.423 ↑ 1.1 103,913 1

Sort (cost=311,033.34..311,322.03 rows=115,476 width=199) (actual time=2,174.553..2,192.423 rows=103,913 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,584kB
3. 21.698 2,102.802 ↑ 1.1 103,913 1

Hash Left Join (cost=242,241.79..290,270.40 rows=115,476 width=199) (actual time=2,027.041..2,102.802 rows=103,913 loops=1)

  • Hash Cond: (bordereau.id_bordereau = avoir_data.id_bordereau)
4. 20.168 2,075.660 ↑ 1.1 103,852 1

Hash Left Join (cost=241,368.19..288,375.31 rows=115,476 width=203) (actual time=2,021.584..2,075.660 rows=103,852 loops=1)

  • Hash Cond: (bordereau.id_film = films.id_film)
5. 33.949 2,051.929 ↑ 1.1 103,852 1

Hash Right Join (cost=240,621.26..286,042.12 rows=115,476 width=189) (actual time=2,018.005..2,051.929 rows=103,852 loops=1)

  • Hash Cond: (encaissement.id_fact = facture.id_fact)
6. 118.145 118.145 ↑ 3.0 58 1

Seq Scan on encaissement (cost=0.00..42,373.10 rows=174 width=4) (actual time=7.395..118.145 rows=58 loops=1)

  • Filter: (id_distri = 42)
  • Rows Removed by Filter: 1,744,590
7. 40.643 1,899.835 ↑ 1.1 103,852 1

Hash (cost=236,132.81..236,132.81 rows=115,476 width=189) (actual time=1,899.834..1,899.835 rows=103,852 loops=1)

  • Buckets: 32,768 Batches: 8 Memory Usage: 2,119kB
8. 12.665 1,859.192 ↑ 1.1 103,852 1

Nested Loop (cost=77,637.63..236,132.81 rows=115,476 width=189) (actual time=528.195..1,859.192 rows=103,852 loops=1)

9. 0.011 0.011 ↑ 1.0 1 1

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

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

Hash Left Join (cost=77,637.36..234,969.76 rows=115,476 width=189) (actual time=528.186..1,846.516 rows=103,852 loops=1)

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

Hash Left Join (cost=77,218.64..232,967.10 rows=115,476 width=183) (actual time=525.861..1,818.437 rows=103,852 loops=1)

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

Hash Join (cost=76,064.16..230,265.08 rows=115,476 width=156) (actual time=515.529..1,775.570 rows=103,852 loops=1)

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

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

14. 19.067 514.900 ↑ 1.0 76,239 1

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

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

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

  • Hash Cond: (edition_fact.id_fact = facture.id_fact)
16. 146.379 146.379 ↑ 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.008..146.379 rows=1,555,354 loops=1)

17. 23.910 74.815 ↑ 1.0 76,239 1

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

  • Buckets: 32,768 Batches: 4 Memory Usage: 2,116kB
18. 45.665 50.905 ↑ 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.838..50.905 rows=76,239 loops=1)

  • Recheck Cond: (id_distri = 42)
  • Heap Blocks: exact=13,266
19. 5.240 5.240 ↑ 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.240..5.240 rows=76,239 loops=1)

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

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

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

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

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

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

23. 1.004 3.030 ↑ 1.0 7,410 1

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

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

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

25. 0.404 2.315 ↑ 1.0 4,804 1

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

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

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

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

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

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

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

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

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

30. 1.495 3.563 ↑ 1.0 13,197 1

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

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

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

32. 2.297 5.444 ↑ 1.0 26,560 1

Hash (cost=541.60..541.60 rows=26,560 width=4) (actual time=5.444..5.444 rows=26,560 loops=1)

  • Buckets: 32,768 Batches: 1 Memory Usage: 1,190kB
33. 3.147 3.147 ↑ 1.0 26,560 1

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

Planning time : 1.846 ms
Execution time : 2,225.987 ms