explain.depesz.com

PostgreSQL's explain analyze made readable

Result: EOSX

Settings
# exclusive inclusive rows x rows loops node
1. 0.008 3,894.811 ↓ 5.0 5 1

Unique (cost=36,963.19..36,963.23 rows=1 width=144) (actual time=3,894.804..3,894.811 rows=5 loops=1)

2. 0.036 3,894.803 ↓ 9.0 9 1

Sort (cost=36,963.19..36,963.19 rows=1 width=144) (actual time=3,894.803..3,894.803 rows=9 loops=1)

  • Sort Key: films.nom_film, reservations.date_debut, cinema.liv_ville, cinema.liv_dep, cinema.id_cinema, cinema.nom_cinema, films.id_film, societe.id_societe, societe.nom_societe, prestataire.notif_emails, package_details.package_label, reservations.date_fin, reservations.comment_delivery, reser_delivery_date.cine_delivery_date
  • Sort Method: quicksort Memory: 29kB
3. 0.008 3,894.767 ↓ 9.0 9 1

Nested Loop Left Join (cost=1,020.53..36,963.18 rows=1 width=144) (actual time=3,894.620..3,894.767 rows=9 loops=1)

  • Filter: (delivery.info IS NULL)
4. 0.008 3,894.723 ↓ 9.0 9 1

Merge Join (cost=1,020.10..36,962.69 rows=1 width=148) (actual time=3,894.601..3,894.723 rows=9 loops=1)

  • Merge Cond: (requetes_transport.presta_dest = societe.id_societe)
5. 0.120 3,894.519 ↑ 2.2 9 1

Nested Loop (cost=1,019.70..55,389.23 rows=20 width=131) (actual time=3,894.401..3,894.519 rows=9 loops=1)

  • Join Filter: (requetes_transport.presta_dest = prestataire.id_societe)
  • Rows Removed by Join Filter: 594
6. 0.024 0.024 ↑ 1.0 67 1

Index Scan using prestataire_pkey on prestataire (cost=0.14..13.15 rows=67 width=28) (actual time=0.006..0.024 rows=67 loops=1)

7. 0.022 3,894.375 ↑ 3.2 9 67

Materialize (cost=1,019.56..55,347.01 rows=29 width=103) (actual time=26.133..58.125 rows=9 loops=67)

8. 0.015 3,894.353 ↑ 3.2 9 1

Hash Join (cost=1,019.56..55,346.86 rows=29 width=103) (actual time=1,750.896..3,894.353 rows=9 loops=1)

  • Hash Cond: (requetes_transport.status = transport_status.id_status)
9. 0.029 3,894.331 ↑ 8.0 11 1

Hash Join (cost=1,018.44..55,345.13 rows=88 width=107) (actual time=1,750.884..3,894.331 rows=11 loops=1)

  • Hash Cond: (requetes_transport.type_envoi = type_envoi_transport.id_type)
10. 0.037 3,894.300 ↑ 13.0 34 1

Nested Loop (cost=1,017.37..55,341.52 rows=441 width=111) (actual time=1,688.861..3,894.300 rows=34 loops=1)

11. 33.342 3,890.557 ↑ 13.0 34 1

Hash Left Join (cost=1,016.94..55,098.46 rows=441 width=99) (actual time=1,688.464..3,890.557 rows=34 loops=1)

  • Hash Cond: (reservations.id_reser = reser_delivery_date.id_reser)
  • Filter: (((reser_delivery_date.cine_delivery_date >= '2020-09-09 00:00:00'::timestamp without time zone) OR (reservations.date_debut >= '2020-09-09'::date)) AND ((reser_delivery_date.cine_delivery_date < '2020-09-16 00:00:00'::timestamp without time zone) OR (reservations.date_debut < '2020-09-16'::date)))
  • Rows Removed by Filter: 94,624
12. 52.811 3,855.773 ↓ 2.3 94,658 1

Nested Loop (cost=798.05..54,722.47 rows=40,934 width=95) (actual time=15.874..3,855.773 rows=94,658 loops=1)

13. 50.529 3,231.138 ↓ 2.3 71,478 1

Hash Join (cost=797.63..40,113.45 rows=30,627 width=95) (actual time=15.849..3,231.138 rows=71,478 loops=1)

  • Hash Cond: (contract.id_cinema = cinema.id_cinema)
14. 41.685 3,175.326 ↓ 2.3 71,478 1

Nested Loop (cost=377.98..39,272.68 rows=30,627 width=64) (actual time=10.555..3,175.326 rows=71,478 loops=1)

15. 39.649 1,561.125 ↓ 2.1 71,478 1

Nested Loop (cost=377.55..22,025.55 rows=34,326 width=64) (actual time=10.182..1,561.125 rows=71,478 loops=1)

16. 9.598 502.626 ↓ 2.0 72,775 1

Nested Loop (cost=377.12..4,582.59 rows=35,666 width=42) (actual time=9.795..502.626 rows=72,775 loops=1)

17. 0.373 19.458 ↓ 1.6 355 1

Nested Loop (cost=376.69..1,023.29 rows=222 width=42) (actual time=9.135..19.458 rows=355 loops=1)

18. 3.308 15.089 ↓ 1.2 444 1

Hash Join (cost=376.41..903.31 rows=363 width=42) (actual time=9.085..15.089 rows=444 loops=1)

  • Hash Cond: (package_details.id_film = films.id_film)
19. 2.882 2.882 ↑ 1.0 24,165 1

Seq Scan on package_details (cost=0.00..432.65 rows=24,165 width=24) (actual time=0.174..2.882 rows=24,165 loops=1)

20. 0.076 8.899 ↑ 1.0 203 1

Hash (cost=373.87..373.87 rows=203 width=22) (actual time=8.899..8.899 rows=203 loops=1)

  • Buckets: 1,024 Batches: 1 Memory Usage: 19kB
21. 8.530 8.823 ↑ 1.0 203 1

Bitmap Heap Scan on films (cost=5.86..373.87 rows=203 width=22) (actual time=0.469..8.823 rows=203 loops=1)

  • Recheck Cond: (id_societe = 42)
  • Heap Blocks: exact=95
22. 0.293 0.293 ↑ 1.0 203 1

Bitmap Index Scan on idx_films_id_societe_advanced (cost=0.00..5.81 rows=203 width=0) (actual time=0.293..0.293 rows=203 loops=1)

  • Index Cond: (id_societe = 42)
23. 3.996 3.996 ↑ 1.0 1 444

Index Only Scan using ver_pkg_pkey on ver_pkg (cost=0.29..0.32 rows=1 width=8) (actual time=0.008..0.009 rows=1 loops=444)

  • Index Cond: (id_pkg = package_details.id_pkg)
  • Heap Fetches: 355
24. 473.570 473.570 ↑ 1.9 205 355

Index Only Scan using reser_version_pref_pkey on reser_version_pref (cost=0.43..12.21 rows=382 width=8) (actual time=0.091..1.334 rows=205 loops=355)

  • Index Cond: (id_ver = ver_pkg.id_ver)
  • Heap Fetches: 72,776
25. 1,018.850 1,018.850 ↑ 1.0 1 72,775

Index Scan using reservations_pkey on reservations (cost=0.43..0.48 rows=1 width=22) (actual time=0.014..0.014 rows=1 loops=72,775)

  • Index Cond: (id_reser = reser_version_pref.id_reser)
  • Filter: ((NOT alt_format) AND is_valid)
  • Rows Removed by Filter: 0
26. 1,572.516 1,572.516 ↑ 1.0 1 71,478

Index Scan using contract_pkey on contract (cost=0.43..0.49 rows=1 width=8) (actual time=0.022..0.022 rows=1 loops=71,478)

  • Index Cond: (id_contract = reservations.id_contract)
27. 1.126 5.283 ↑ 1.1 7,479 1

Hash (cost=320.40..320.40 rows=7,940 width=35) (actual time=5.283..5.283 rows=7,479 loops=1)

  • Buckets: 8,192 Batches: 1 Memory Usage: 582kB
28. 4.157 4.157 ↑ 1.1 7,479 1

Seq Scan on cinema (cost=0.00..320.40 rows=7,940 width=35) (actual time=0.003..4.157 rows=7,479 loops=1)

29. 571.824 571.824 ↑ 1.0 1 71,478

Index Scan using idx_requete_reser_transport_id_reser on requete_reser_transport (cost=0.43..0.47 rows=1 width=8) (actual time=0.007..0.008 rows=1 loops=71,478)

  • Index Cond: (id_reser = reser_version_pref.id_reser)
30. 0.682 1.442 ↑ 1.1 7,325 1

Hash (cost=121.17..121.17 rows=7,817 width=12) (actual time=1.442..1.442 rows=7,325 loops=1)

  • Buckets: 8,192 Batches: 1 Memory Usage: 379kB
31. 0.760 0.760 ↑ 1.0 7,817 1

Seq Scan on reser_delivery_date (cost=0.00..121.17 rows=7,817 width=12) (actual time=0.008..0.760 rows=7,817 loops=1)

32. 3.706 3.706 ↑ 1.0 1 34

Index Scan using requetes_transport_pkey on requetes_transport (cost=0.43..0.54 rows=1 width=16) (actual time=0.108..0.109 rows=1 loops=34)

  • Index Cond: (id_transport = requete_reser_transport.id_transport)
33. 0.000 0.002 ↑ 1.0 1 1

Hash (cost=1.06..1.06 rows=1 width=4) (actual time=0.002..0.002 rows=1 loops=1)

  • Buckets: 1,024 Batches: 1 Memory Usage: 9kB
34. 0.002 0.002 ↑ 1.0 1 1

Seq Scan on type_envoi_transport (cost=0.00..1.06 rows=1 width=4) (actual time=0.002..0.002 rows=1 loops=1)

  • Filter: ((type_transport)::text = 'ENVOI_DD'::text)
  • Rows Removed by Filter: 4
35. 0.002 0.007 ↑ 1.0 2 1

Hash (cost=1.09..1.09 rows=2 width=4) (actual time=0.007..0.007 rows=2 loops=1)

  • Buckets: 1,024 Batches: 1 Memory Usage: 9kB
36. 0.005 0.005 ↑ 1.0 2 1

Seq Scan on transport_status (cost=0.00..1.09 rows=2 width=4) (actual time=0.004..0.005 rows=2 loops=1)

  • Filter: (((name)::text = 'VALIDATED'::text) OR ((name)::text = 'IN_PROGRESS'::text))
  • Rows Removed by Filter: 4
37. 0.196 0.196 ↑ 163.6 30 1

Index Scan using societe_pkey on societe (cost=0.28..590.36 rows=4,909 width=25) (actual time=0.137..0.196 rows=30 loops=1)

38. 0.036 0.036 ↓ 0.0 0 9

Index Scan using idx_delivery_id_transport on delivery (cost=0.43..0.48 rows=1 width=17) (actual time=0.004..0.004 rows=0 loops=9)

  • Index Cond: (requetes_transport.id_transport = id_transport)
Planning time : 18.673 ms
Execution time : 3,895.138 ms