explain.depesz.com

PostgreSQL's explain analyze made readable

Result: 55Mb

Settings
# exclusive inclusive rows x rows loops node
1. 0.028 121,013.377 ↓ 0.0 0 1

Sort (cost=3,622.19..3,622.19 rows=1 width=2,396) (actual time=121,013.377..121,013.377 rows=0 loops=1)

  • Sort Key: carelogs_signature.signature_type
  • Sort Method: quicksort Memory: 25kB
2. 0.002 121,013.349 ↓ 0.0 0 1

Nested Loop Left Join (cost=23.24..3,622.18 rows=1 width=2,396) (actual time=121,013.349..121,013.349 rows=0 loops=1)

3. 0.000 121,013.347 ↓ 0.0 0 1

Nested Loop (cost=22.68..3,621.52 rows=1 width=1,990) (actual time=121,013.347..121,013.347 rows=0 loops=1)

4. 0.002 121,013.347 ↓ 0.0 0 1

Nested Loop Left Join (cost=22.25..3,621.04 rows=1 width=1,826) (actual time=121,013.347..121,013.347 rows=0 loops=1)

5. 3,050.922 121,013.345 ↓ 0.0 0 1

Nested Loop (cost=21.82..3,620.53 rows=1 width=1,420) (actual time=121,013.345..121,013.345 rows=0 loops=1)

6. 4,706.337 103,928.004 ↓ 22,527.2 2,004,917 1

Nested Loop (cost=21.38..3,540.64 rows=89 width=807) (actual time=4.980..103,928.004 rows=2,004,917 loops=1)

7. 29.581 124.971 ↓ 40.4 11,224 1

Nested Loop (cost=20.81..155.38 rows=278 width=225) (actual time=4.350..124.971 rows=11,224 loops=1)

8. 0.089 3.305 ↓ 21.0 21 1

HashAggregate (cost=20.38..20.39 rows=1 width=8) (actual time=3.252..3.305 rows=21 loops=1)

  • Group Key: u0.id
9. 2.580 3.216 ↓ 21.0 21 1

Hash Join (cost=10.66..20.38 rows=1 width=8) (actual time=1.127..3.216 rows=21 loops=1)

  • Hash Cond: (u2.location_id = u0.id)
  • -> Index Scan using agency_agencyadminlocation_admin_id on agency_agencyadminlocation u2 (cost=0.29..9.94 rows=16 width=4) (actual time=0.472..2.514 rows=21 loo
  • Index Cond: (admin_id = 59412)
  • Filter: clients
10. 0.636 0.636 ↑ 1.0 21 1

Hash (cost=10.11..10.11 rows=21 width=4) (actual time=0.636..0.636 rows=21 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 9kB
  • -> Index Scan using agency_agencylocation_agency_id on agency_agencylocation u0 (cost=0.29..10.11 rows=21 width=4) (actual time=0.496..0.618 rows=21 loops
  • Index Cond: (agency_id = 1142)
11. 92.085 92.085 ↓ 1.9 534 21

Index Scan using patient_patient_location_id_2 on patient_patient (cost=0.43..132.22 rows=278 width=225) (actual time=0.271..4.385 rows=534 loops=21)

  • Index Cond: (location_id = u0.id)
12. 99,096.696 99,096.696 ↓ 44.8 179 11,224

Index Scan using carelogs_carelog_patient_id_clock_out_2 on carelogs_carelog (cost=0.57..12.14 rows=4 width=582) (actual time=0.253..8.829 rows=179 loops=11,224)

  • Index Cond: (patient_id = patient_patient.id)
  • Filter: (agency_id = 1142)
13. 14,034.419 14,034.419 ↓ 0.0 0 2,004,917

Index Scan using carelogs_signature_carelog_id_d4bfbf846f72793_uniq_new on carelogs_signature (cost=0.44..0.89 rows=1 width=613) (actual time=0.007..0.007 rows=0 loops=2,004,917)

  • Index Cond: (carelog_id = carelogs_carelog.id)
  • Filter: ((NOT signed) AND (audio IS NOT NULL) AND (created >= '2019-08-05 08:42:07.914679'::timestamp without time zone) AND (signature_type <> 3) AND ((audio)::text <> ''::text))
  • Rows Removed by Filter: 0
14. 0.000 0.000 ↓ 0.0 0

Index Scan using profile_profile_patient_id_agency_id_partial on profile_profile (cost=0.43..0.51 rows=1 width=406) (never executed)

  • Index Cond: (patient_patient.id = patient_id)
15. 0.000 0.000 ↓ 0.0 0

Index Scan using caregiver_caregiver_pkey on caregiver_caregiver (cost=0.43..0.47 rows=1 width=164) (never executed)

  • Index Cond: (id = carelogs_carelog.caregiver_id)
16. 0.000 0.000 ↓ 0.0 0

Index Scan using profile_profile_caregiver_id_key_new_2 on profile_profile t8 (cost=0.56..0.64 rows=1 width=406) (never executed)

  • Index Cond: (caregiver_caregiver.id = caregiver_id)
Planning time : 55.529 ms
Execution time : 121,014.140 ms