explain.depesz.com

PostgreSQL's explain analyze made readable

Result: SF5x

Settings
# exclusive inclusive rows x rows loops node
1. 0.022 5.441 ↑ 1.0 1 1

Aggregate (cost=15,321.35..15,321.36 rows=1 width=8) (actual time=5.441..5.441 rows=1 loops=1)

2. 0.082 5.419 ↑ 1.0 207 1

Group (cost=7,685.98..15,318.76 rows=207 width=18) (actual time=5.322..5.419 rows=207 loops=1)

  • Group Key: properties_client.id, ((SubPlan 1)), people_contactdetails.name
3. 0.117 5.337 ↑ 1.0 207 1

Sort (cost=7,685.98..7,686.50 rows=207 width=18) (actual time=5.321..5.337 rows=207 loops=1)

  • Sort Key: properties_client.id, ((SubPlan 1)), people_contactdetails.name
  • Sort Method: quicksort Memory: 41kB
4. 0.359 5.220 ↑ 1.0 207 1

Hash Join (cost=13.41..7,678.02 rows=207 width=18) (actual time=0.254..5.220 rows=207 loops=1)

  • Hash Cond: (people_contactdetails.id = properties_client.primary_contact_id)
5. 0.128 0.128 ↑ 1.0 1,152 1

Seq Scan on people_contactdetails (cost=0.00..27.52 rows=1,152 width=10) (actual time=0.005..0.128 rows=1,152 loops=1)

6. 0.051 0.179 ↑ 1.0 207 1

Hash (cost=10.82..10.82 rows=207 width=8) (actual time=0.179..0.179 rows=207 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 17kB
7. 0.128 0.128 ↑ 1.0 207 1

Seq Scan on properties_client (cost=0.00..10.82 rows=207 width=8) (actual time=0.005..0.128 rows=207 loops=1)

  • Filter: is_active
  • Rows Removed by Filter: 175
8.          

SubPlan (for Hash Join)

9. 0.828 4.554 ↑ 1.0 1 207

GroupAggregate (cost=4.62..36.86 rows=1 width=12) (actual time=0.022..0.022 rows=1 loops=207)

  • Group Key: u0.id
10. 0.828 3.726 ↓ 10.0 10 207

Nested Loop Left Join (cost=4.62..36.84 rows=1 width=11) (actual time=0.008..0.018 rows=10 loops=207)

  • Join Filter: (u0.id = u1.client_id)
11. 0.207 0.207 ↑ 1.0 1 207

Index Only Scan using properties_client_pkey on properties_client u0 (cost=0.27..4.29 rows=1 width=4) (actual time=0.001..0.001 rows=1 loops=207)

  • Index Cond: (id = properties_client.id)
  • Heap Fetches: 0
12. 2.070 2.691 ↓ 1.1 10 207

Bitmap Heap Scan on properties_property u1 (cost=4.35..32.44 rows=9 width=11) (actual time=0.005..0.013 rows=10 loops=207)

  • Recheck Cond: (client_id = properties_client.id)
  • Heap Blocks: exact=1192
13. 0.621 0.621 ↓ 1.1 10 207

Bitmap Index Scan on properties_property_client_id_idx (cost=0.00..4.35 rows=9 width=0) (actual time=0.003..0.003 rows=10 loops=207)

  • Index Cond: (client_id = properties_client.id)
Planning time : 0.756 ms
Execution time : 5.562 ms