explain.depesz.com

PostgreSQL's explain analyze made readable

Result: gq5t : Optimization for: Optimization for: Optimization for: Optimization for: plan #T8Yq; plan #DFJ9; plan #SmXZ; plan #GYNs

Settings

Optimization path:

# exclusive inclusive rows x rows loops node
1. 0.006 0.031 ↓ 0.0 0 1

Sort (cost=20,801.30..20,801.40 rows=42 width=538) (actual time=0.031..0.031 rows=0 loops=1)

  • Sort Key: cg.name
  • Sort Method: quicksort Memory: 25kB
2. 0.000 0.025 ↓ 0.0 0 1

Nested Loop Left Join (cost=57.59..20,800.17 rows=42 width=538) (actual time=0.025..0.025 rows=0 loops=1)

3. 0.003 0.025 ↓ 0.0 0 1

Hash Semi Join (cost=57.30..63.45 rows=42 width=530) (actual time=0.025..0.025 rows=0 loops=1)

  • Hash Cond: (cg.id = contact_group_contact.contact_group_id)
4. 0.013 0.013 ↑ 200.0 1 1

Seq Scan on contact_group cg (cost=0.00..5.00 rows=200 width=530) (actual time=0.013..0.013 rows=1 loops=1)

5. 0.000 0.009 ↓ 0.0 0 1

Hash (cost=56.78..56.78 rows=42 width=4) (actual time=0.009..0.009 rows=0 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 8kB
6. 0.001 0.009 ↓ 0.0 0 1

Bitmap Heap Scan on contact_group_contact (cost=4.61..56.78 rows=42 width=4) (actual time=0.009..0.009 rows=0 loops=1)

  • Recheck Cond: (contact_id = 85666)
7. 0.008 0.008 ↓ 0.0 0 1

Bitmap Index Scan on contact_group_contact_idx (cost=0.00..4.60 rows=42 width=0) (actual time=0.008..0.008 rows=0 loops=1)

  • Index Cond: (contact_id = 85666)
8. 0.000 0.000 ↓ 0.0 0

GroupAggregate (cost=0.29..493.71 rows=1 width=12) (never executed)

  • Group Key: contact_group_contact_1.contact_group_id
9. 0.000 0.000 ↓ 0.0 0

Nested Loop (cost=0.29..493.70 rows=1 width=8) (never executed)

10. 0.000 0.000 ↓ 0.0 0

Seq Scan on contact_group_contact contact_group_contact_1 (cost=0.00..156.64 rows=42 width=8) (never executed)

  • Filter: (contact_group_id = cg.id)
11. 0.000 0.000 ↓ 0.0 0

Index Scan using contact__pkey on contact con (cost=0.29..8.02 rows=1 width=4) (never executed)

  • Index Cond: (id = contact_group_contact_1.contact_id)
  • Filter: (deleted_timestamp IS NULL)
Planning time : 0.405 ms
Execution time : 0.094 ms