explain.depesz.com

PostgreSQL's explain analyze made readable

Result: lwB

Settings
# exclusive inclusive rows x rows loops node
1. 0.009 15.192 ↑ 1.0 5 1

Limit (cost=903.29..3,900.61 rows=5 width=2,480) (actual time=14.938..15.192 rows=5 loops=1)

2. 0.001 15.183 ↑ 34,837.4 5 1

Append (cost=903.29..104,419,921.07 rows=174,187 width=2,480) (actual time=14.936..15.183 rows=5 loops=1)

3. 0.003 15.182 ↑ 3,949.2 5 1

Subquery Scan on *SELECT* 1 (cost=903.29..4,864,708.70 rows=19,746 width=3,870) (actual time=14.936..15.182 rows=5 loops=1)

4. 0.299 15.179 ↑ 3,949.2 5 1

Hash Right Join (cost=903.29..4,864,461.88 rows=19,746 width=3,868) (actual time=14.934..15.179 rows=5 loops=1)

  • Hash Cond: (event_details.id_event_details = event.id_event_details)
5. 0.018 0.018 ↑ 3,949.2 5 1

Seq Scan on event_details (cost=0.00..920.46 rows=19,746 width=625) (actual time=0.017..0.018 rows=5 loops=1)

6. 7.717 14.572 ↑ 1.0 19,746 1

Hash (cost=656.46..656.46 rows=19,746 width=133) (actual time=14.571..14.572 rows=19,746 loops=1)

  • Buckets: 32768 Batches: 1 Memory Usage: 3453kB
7. 6.855 6.855 ↑ 1.0 19,746 1

Seq Scan on event (cost=0.00..656.46 rows=19,746 width=133) (actual time=0.019..6.855 rows=19,746 loops=1)

8.          

SubPlan (forHash Right Join)

9. 0.015 0.015 ↑ 1.0 1 5

Seq Scan on concession (cost=0.00..10.13 rows=1 width=146) (actual time=0.003..0.003 rows=1 loops=5)

  • Filter: (id_concession = event.id_concession)
  • Rows Removed by Filter: 4
10. 0.010 0.010 ↑ 1.0 1 5

Seq Scan on concession concession_1 (cost=0.00..10.13 rows=1 width=12) (actual time=0.002..0.002 rows=1 loops=5)

  • Filter: (id_concession = event.id_concession)
  • Rows Removed by Filter: 4
11. 0.005 0.005 ↓ 0.0 0 5

Seq Scan on reference_event_type (cost=0.00..11.63 rows=1 width=516) (actual time=0.001..0.001 rows=0 loops=5)

  • Filter: (id = event.reference_event_type_id)
12. 0.005 0.005 ↓ 0.0 0 5

Seq Scan on reference_event_title (cost=0.00..11.75 rows=1 width=516) (actual time=0.001..0.001 rows=0 loops=5)

  • Filter: (id = event.reference_event_title_id)
13. 0.005 0.005 ↓ 0.0 0 5

Seq Scan on reference_event_sub_title (cost=0.00..11.75 rows=1 width=516) (actual time=0.001..0.001 rows=0 loops=5)

  • Filter: (id = event.reference_event_sub_title_id)
14. 0.005 0.005 ↓ 0.0 0 5

Seq Scan on reference_dress_code (cost=0.00..11.75 rows=1 width=516) (actual time=0.001..0.001 rows=0 loops=5)

  • Filter: (id = event.reference_dress_code_id)
15. 0.020 0.020 ↑ 1.0 1 5

Index Scan using "PK_ADDRESS" on address (cost=0.43..8.45 rows=1 width=32) (actual time=0.004..0.004 rows=1 loops=5)

  • Index Cond: (id_address = event.address_id)
16. 0.010 0.010 ↑ 1.0 1 5

Index Scan using "PK_ADDRESS" on address address_1 (cost=0.43..8.45 rows=1 width=32) (actual time=0.002..0.002 rows=1 loops=5)

  • Index Cond: (id_address = event.address_id)
17. 0.015 0.015 ↑ 1.0 1 5

Index Scan using "PK_ADDRESS" on address address_2 (cost=0.43..8.45 rows=1 width=32) (actual time=0.003..0.003 rows=1 loops=5)

  • Index Cond: (id_address = event.address_id)
18. 0.010 0.010 ↑ 1.0 1 5

Index Scan using "PK_ADDRESS" on address address_3 (cost=0.43..8.45 rows=1 width=32) (actual time=0.002..0.002 rows=1 loops=5)

  • Index Cond: (id_address = event.address_id)
19. 0.010 0.010 ↑ 1.0 1 5

Index Scan using "PK_ADDRESS" on address address_4 (cost=0.43..8.45 rows=1 width=32) (actual time=0.002..0.002 rows=1 loops=5)

  • Index Cond: (id_address = event.address_id)
20. 0.050 0.050 ↑ 1.0 1 5

Index Scan using "PK_COLLABORATOR" on collaborator (cost=0.29..8.31 rows=1 width=4) (actual time=0.010..0.010 rows=1 loops=5)

  • Index Cond: (id_people = event.organizer_id)
21. 0.010 0.010 ↑ 1.0 1 5

Index Scan using "PK_COLLABORATOR" on collaborator collaborator_1 (cost=0.29..8.31 rows=1 width=4) (actual time=0.002..0.002 rows=1 loops=5)

  • Index Cond: (id_people = event.organizer_id)
22. 0.035 0.035 ↑ 1.0 1 5

Index Scan using "PK_ABSTRACTPEOPLE" on abstractpeople (cost=0.29..8.31 rows=1 width=32) (actual time=0.007..0.007 rows=1 loops=5)

  • Index Cond: (id_people = event.organizer_id)
23. 0.010 0.010 ↑ 1.0 1 5

Index Scan using "PK_ABSTRACTPEOPLE" on abstractpeople abstractpeople_1 (cost=0.29..8.31 rows=1 width=13) (actual time=0.002..0.002 rows=1 loops=5)

  • Index Cond: (id_people = event.organizer_id)
24. 0.010 0.010 ↑ 1.0 1 5

Index Scan using "PK_COLLABORATOR" on collaborator collaborator_2 (cost=0.29..8.31 rows=1 width=34) (actual time=0.002..0.002 rows=1 loops=5)

  • Index Cond: (id_people = event.organizer_id)
25. 0.010 0.030 ↑ 1.0 1 5

Aggregate (cost=9.39..9.40 rows=1 width=8) (actual time=0.006..0.006 rows=1 loops=5)

26. 0.020 0.020 ↑ 3.8 5 5

Index Only Scan using idx_276992f71f7e88b on abstractguest (cost=0.42..9.34 rows=19 width=0) (actual time=0.004..0.004 rows=5 loops=5)

  • Index Cond: (event_id = event.id)
  • Heap Fetches: 23
27. 0.005 0.020 ↑ 1.0 1 5

Aggregate (cost=9.40..9.41 rows=1 width=8) (actual time=0.004..0.004 rows=1 loops=5)

28. 0.015 0.015 ↓ 0.0 0 5

Index Scan using idx_276992f71f7e88b on abstractguest abstractguest_1 (cost=0.42..9.39 rows=5 width=0) (actual time=0.003..0.003 rows=0 loops=5)

  • Index Cond: (event_id = event.id)
  • Filter: (ispresent = 1)
  • Rows Removed by Filter: 5
29. 0.000 0.000 ↑ 1.0 1 5

Aggregate (cost=68.35..68.36 rows=1 width=8) (actual time=0.000..0.000 rows=1 loops=5)

30. 0.000 0.000 ↓ 0.0 0 5

Result (cost=0.15..68.35 rows=1 width=0) (actual time=0.000..0.000 rows=0 loops=5)

  • One-Time Filter: (event.reference_event_title_id = event.reference_event_title_id)
31. 0.000 0.000 ↓ 0.0 0

Nested Loop (cost=0.15..68.35 rows=1 width=0) (never executed)

  • Join Filter: (event_title_concession.training_id = training.id_training)
32. 0.000 0.000 ↓ 0.0 0

Nested Loop (cost=0.14..57.56 rows=1 width=4) (never executed)

33. 0.000 0.000 ↓ 0.0 0

Nested Loop (cost=0.14..19.80 rows=1 width=0) (never executed)

34. 0.000 0.000 ↓ 0.0 0

Seq Scan on reference_event_type reference_event_type_1 (cost=0.00..11.63 rows=1 width=4) (never executed)

  • Filter: (id = event.reference_event_type_id)
35. 0.000 0.000 ↓ 0.0 0

Index Only Scan using idx_8c1a8b7363e31040 on reference_event_title reference_event_title_1 (cost=0.14..8.16 rows=1 width=4) (never executed)

  • Index Cond: (reference_event_type_id = event.reference_event_type_id)
  • Heap Fetches: 0
36. 0.000 0.000 ↓ 0.0 0

Seq Scan on event_title_concession (cost=0.00..37.75 rows=1 width=4) (never executed)

  • Filter: ((event.reference_event_title_id = ref_event_title_id) AND (id_concession = event.id_concession))
37. 0.000 0.000 ↓ 0.0 0

Seq Scan on training (cost=0.00..10.60 rows=15 width=4) (never executed)

  • Filter: (enabled AND is_qualifying)
38. 0.005 0.015 ↑ 1.0 1 5

Aggregate (cost=8.17..8.18 rows=1 width=8) (actual time=0.003..0.003 rows=1 loops=5)

39. 0.010 0.010 ↓ 0.0 0 5

Index Scan using idx_c24e709e71f7e88b on time_sheet (cost=0.14..8.16 rows=1 width=8) (actual time=0.002..0.002 rows=0 loops=5)

  • Index Cond: (event_id = event.id)
  • Filter: (time_sheet_status_id = 2)
40. 0.000 0.000 ↓ 0.0 0

Subquery Scan on *SELECT* 2 (cost=0.00..99,554,341.43 rows=154,441 width=1,347) (never executed)

41. 0.000 0.000 ↓ 0.0 0

Nested Loop Left Join (cost=0.00..99,550,480.41 rows=154,441 width=1,288) (never executed)

  • Join Filter: (zip.id_zip = location.id_zip)
42. 0.000 0.000 ↓ 0.0 0

Nested Loop Left Join (cost=0.00..10,568,915.50 rows=77,104 width=203) (never executed)

  • Join Filter: (location.id_location = event_1.id_location)
43. 0.000 0.000 ↓ 0.0 0

Seq Scan on event event_1 (cost=0.00..2,534.52 rows=38,552 width=171) (never executed)

44. 0.000 0.000 ↓ 0.0 0

Materialize (cost=0.00..1,251.05 rows=18,270 width=36) (never executed)

45. 0.000 0.000 ↓ 0.0 0

Seq Scan on location (cost=0.00..1,159.70 rows=18,270 width=36) (never executed)

46. 0.000 0.000 ↓ 0.0 0

Materialize (cost=0.00..1,840.23 rows=74,082 width=22) (never executed)

47. 0.000 0.000 ↓ 0.0 0

Seq Scan on zip (cost=0.00..1,469.82 rows=74,082 width=22) (never executed)

48.          

SubPlan (forNested Loop Left Join)

49. 0.000 0.000 ↓ 0.0 0

Seq Scan on reference_event_type reference_event_type_2 (cost=0.00..11.63 rows=1 width=516) (never executed)

  • Filter: (id = event_1.id_event_type)
50. 0.000 0.000 ↓ 0.0 0

Seq Scan on country (cost=0.00..9.71 rows=2 width=32) (never executed)

  • Filter: (id_country = event_1.id_country)
Planning time : 10.600 ms