explain.depesz.com

PostgreSQL's explain analyze made readable

Result: CpGZ

Settings
# exclusive inclusive rows x rows loops node
1. 0.917 1,185.680 ↑ 1.6 462 1

Hash Left Join (cost=67.28..467.43 rows=720 width=504) (actual time=11.970..1,185.680 rows=462 loops=1)

  • Hash Cond: (image.date_id = dates.id)
2. 0.613 1,184.241 ↑ 1.6 462 1

Hash Join (cost=37.01..412.86 rows=720 width=551) (actual time=11.430..1,184.241 rows=462 loops=1)

  • Hash Cond: (image.uploaded_by = users.user_id)
3. 0.907 1,183.605 ↑ 26.0 462 1

Nested Loop Left Join (cost=34.74..378.42 rows=12,000 width=526) (actual time=11.399..1,183.605 rows=462 loops=1)

4. 0.733 20.306 ↓ 38.5 462 1

Nested Loop Left Join (cost=34.49..138.17 rows=12 width=625) (actual time=9.190..20.306 rows=462 loops=1)

5. 0.896 12.181 ↓ 38.5 462 1

Nested Loop Left Join (cost=34.21..59.91 rows=12 width=518) (actual time=9.180..12.181 rows=462 loops=1)

6. 0.629 9.899 ↓ 38.5 462 1

Hash Right Join (cost=33.94..54.38 rows=12 width=458) (actual time=9.169..9.899 rows=462 loops=1)

  • Hash Cond: (location.id = image.location_id)
7. 0.118 0.118 ↓ 1.0 322 1

Seq Scan on location (cost=0.00..19.14 rows=314 width=102) (actual time=0.005..0.118 rows=322 loops=1)

8. 0.259 9.152 ↓ 38.5 462 1

Hash (cost=33.79..33.79 rows=12 width=364) (actual time=9.152..9.152 rows=462 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 146kB
9. 0.358 8.893 ↓ 38.5 462 1

Hash Right Join (cost=21.17..33.79 rows=12 width=364) (actual time=8.405..8.893 rows=462 loops=1)

  • Hash Cond: (ifv.image_id = image.id)
10. 0.146 0.146 ↑ 1.0 597 1

Seq Scan on image_face_version ifv (cost=0.00..10.18 rows=618 width=16) (actual time=0.005..0.146 rows=597 loops=1)

11. 0.107 8.389 ↓ 41.2 206 1

Hash (cost=21.11..21.11 rows=5 width=356) (actual time=8.389..8.389 rows=206 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 68kB
12. 0.675 8.282 ↓ 41.2 206 1

Merge Right Join (cost=19.39..21.11 rows=5 width=356) (actual time=6.737..8.282 rows=206 loops=1)

  • Merge Cond: (event.id = image_event.event_id)
13. 0.847 0.847 ↓ 1.1 2,179 1

Index Scan using event_pk on event (cost=0.28..193.11 rows=2,050 width=56) (actual time=0.008..0.847 rows=2,179 loops=1)

14. 0.162 6.760 ↓ 41.2 206 1

Sort (cost=19.11..19.13 rows=5 width=308) (actual time=6.718..6.760 rows=206 loops=1)

  • Sort Key: image_event.event_id
  • Sort Method: quicksort Memory: 111kB
15. 0.110 6.598 ↓ 41.2 206 1

Hash Left Join (cost=6.52..19.05 rows=5 width=308) (actual time=6.422..6.598 rows=206 loops=1)

  • Hash Cond: (image.id = image_event.image_id)
16. 6.452 6.452 ↓ 38.8 194 1

Function Scan on user_image_version_set image (cost=0.25..12.75 rows=5 width=300) (actual time=6.378..6.452 rows=194 loops=1)

  • Filter: (user_id = 218)
17. 0.013 0.036 ↓ 3.5 42 1

Hash (cost=6.12..6.12 rows=12 width=16) (actual time=0.036..0.036 rows=42 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 10kB
18. 0.023 0.023 ↓ 3.5 42 1

Seq Scan on image_event (cost=0.00..6.12 rows=12 width=16) (actual time=0.005..0.023 rows=42 loops=1)

19. 1.386 1.386 ↑ 1.0 1 462

Index Scan using face_id_uindex on face f (cost=0.28..0.46 rows=1 width=68) (actual time=0.003..0.003 rows=1 loops=462)

  • Index Cond: (ifv.face_id = id)
20. 7.392 7.392 ↑ 1.0 1 462

Index Scan using person_face_pkey on person_face (cost=0.28..6.51 rows=1 width=115) (actual time=0.009..0.016 rows=1 loops=462)

  • Index Cond: (f.id = face_id)
21. 1,162.392 1,162.392 ↑ 1,000.0 1 462

Function Scan on user_person_version_set upvf (cost=0.25..10.25 rows=1,000 width=8) (actual time=2.516..2.516 rows=1 loops=462)

22. 0.007 0.023 ↑ 1.0 12 1

Hash (cost=2.12..2.12 rows=12 width=33) (actual time=0.023..0.023 rows=12 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 9kB
23. 0.016 0.016 ↑ 1.0 12 1

Seq Scan on users (cost=0.00..2.12 rows=12 width=33) (actual time=0.008..0.016 rows=12 loops=1)

24. 0.251 0.522 ↓ 1.0 814 1

Hash (cost=20.12..20.12 rows=812 width=17) (actual time=0.522..0.522 rows=814 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 52kB
25. 0.271 0.271 ↓ 1.0 814 1

Seq Scan on dates (cost=0.00..20.12 rows=812 width=17) (actual time=0.006..0.271 rows=814 loops=1)

Planning time : 1.022 ms
Execution time : 1,186.007 ms