explain.depesz.com

PostgreSQL's explain analyze made readable

Result: tlJ0q

Settings
# exclusive inclusive rows x rows loops node
1. 0.007 0.195 ↑ 5.0 1 1

Result (cost=1.96..13.45 rows=5 width=515) (actual time=0.194..0.195 rows=1 loops=1)

  • One-Time Filter: ((current_setting('nimble.company_id'::text))::bytea = '\x4d670aba143e3287b9d4427a'::bytea)
2. 0.001 0.188 ↑ 5.0 1 1

Nested Loop Left Join (cost=1.96..13.45 rows=5 width=515) (actual time=0.188..0.188 rows=1 loops=1)

  • Join Filter: (contacts.id = contacts_values.contact_id)
3. 0.001 0.134 ↑ 1.0 1 1

Nested Loop Left Join (cost=1.39..8.16 rows=1 width=374) (actual time=0.134..0.134 rows=1 loops=1)

  • Join Filter: (contacts.id = contacts__timestamps.contact_id)
4. 0.031 0.121 ↑ 1.0 1 1

Nested Loop Left Join (cost=0.98..5.47 rows=1 width=233) (actual time=0.121..0.121 rows=1 loops=1)

  • Join Filter: (contacts.id = contacts__addresses.contact_id)
5. 0.021 0.021 ↑ 1.0 1 1

Index Scan using contacts_pkey on contacts (cost=0.43..2.65 rows=1 width=92) (actual time=0.021..0.021 rows=1 loops=1)

  • Index Cond: ((company_id = '\x4d670aba143e3287b9d4427a'::bytea) AND (id = '\x55faf7711d4d27483aa17ce7'::bytea))
6. 0.024 0.069 ↑ 1.0 1 1

GroupAggregate (cost=0.55..2.80 rows=1 width=141) (actual time=0.069..0.069 rows=1 loops=1)

  • Group Key: contacts__addresses.contact_id
7. 0.045 0.045 ↓ 9.0 9 1

Index Scan using contacts__addresses_pkey on contacts__addresses (cost=0.55..2.77 rows=1 width=90) (actual time=0.024..0.045 rows=9 loops=1)

  • Index Cond: ((company_id = '\x4d670aba143e3287b9d4427a'::bytea) AND (contact_id = '\x55faf7711d4d27483aa17ce7'::bytea))
8. 0.000 0.012 ↓ 0.0 0 1

GroupAggregate (cost=0.41..2.66 rows=1 width=141) (actual time=0.012..0.012 rows=0 loops=1)

  • Group Key: contacts__timestamps.contact_id
9. 0.012 0.012 ↓ 0.0 0 1

Index Scan using contacts__timestamps_pkey on contacts__timestamps (cost=0.41..2.63 rows=1 width=45) (actual time=0.012..0.012 rows=0 loops=1)

  • Index Cond: ((company_id = '\x4d670aba143e3287b9d4427a'::bytea) AND (contact_id = '\x55faf7711d4d27483aa17ce7'::bytea))
10. 0.020 0.053 ↑ 5.0 1 1

GroupAggregate (cost=0.56..5.21 rows=5 width=141) (actual time=0.053..0.053 rows=1 loops=1)

  • Group Key: contacts_values.contact_id
11. 0.033 0.033 ↓ 4.4 22 1

Index Scan using contacts_values_pkey on contacts_values (cost=0.56..5.05 rows=5 width=59) (actual time=0.019..0.033 rows=22 loops=1)

  • Index Cond: ((company_id = '\x4d670aba143e3287b9d4427a'::bytea) AND (contact_id = '\x55faf7711d4d27483aa17ce7'::bytea))
Planning time : 0.766 ms
Execution time : 0.390 ms