explain.depesz.com

PostgreSQL's explain analyze made readable

Result: msOv

Settings
# exclusive inclusive rows x rows loops node
1. 0.906 1,129.358 ↑ 1.6 462 1

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

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

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

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

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

4. 0.814 20.045 ↓ 38.5 462 1

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

5. 0.880 12.301 ↓ 38.5 462 1

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

6. 0.637 10.035 ↓ 38.5 462 1

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

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

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

8. 0.262 9.277 ↓ 38.5 462 1

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

  • Buckets: 1024 Batches: 1 Memory Usage: 146kB
9. 0.393 9.015 ↓ 38.5 462 1

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

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

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

11. 0.150 8.480 ↓ 41.2 206 1

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

  • Buckets: 1024 Batches: 1 Memory Usage: 68kB
12. 0.635 8.330 ↓ 41.2 206 1

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

  • Merge Cond: (event.id = image_event.event_id)
13. 0.820 0.820 ↓ 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.820 rows=2,179 loops=1)

14. 0.179 6.875 ↓ 41.2 206 1

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

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

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

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

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

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

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

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

Seq Scan on image_event (cost=0.00..6.12 rows=12 width=16) (actual time=0.005..0.022 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. 6.930 6.930 ↑ 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.015 rows=1 loops=462)

  • Index Cond: (f.id = face_id)
21. 1,106.490 1,106.490 ↑ 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.395..2.395 rows=1 loops=462)

22. 0.007 0.022 ↑ 1.0 12 1

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

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

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

24. 0.241 0.482 ↓ 1.0 814 1

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

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

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

Planning time : 1.002 ms
Execution time : 1,129.695 ms