explain.depesz.com

PostgreSQL's explain analyze made readable

Result: ejdy

Settings
# exclusive inclusive rows x rows loops node
1. 0.114 5.197 ↑ 1.0 1 1

Aggregate (cost=103.05..103.06 rows=1 width=8) (actual time=5.197..5.197 rows=1 loops=1)

2. 0.214 5.083 ↓ 18.5 517 1

Nested Loop (cost=0.84..102.98 rows=28 width=0) (actual time=0.077..5.083 rows=517 loops=1)

3. 0.733 0.733 ↓ 16.2 517 1

Index Only Scan using contacts_importance_company_id_user_id_is_important_contact_id on contacts_importance contacts_importance_1 (cost=0.42..18.26 rows=32 width=26) (actual time=0.058..0.733 rows=517 loops=1)

  • Index Cond: ((company_id = '\x4c2118ad54397f271b000000'::bytea) AND (user_id = '\x4c21187154397f270a000001'::bytea) AND (is_important = true))
  • Filter: (is_important IS TRUE)
  • Heap Fetches: 517
4. 4.136 4.136 ↑ 1.0 1 517

Index Only Scan using contacts_pkey on contacts (cost=0.43..2.65 rows=1 width=26) (actual time=0.008..0.008 rows=1 loops=517)

  • Index Cond: ((company_id = '\x4c2118ad54397f271b000000'::bytea) AND (id = contacts_importance_1.contact_id))
  • Heap Fetches: 517
Planning time : 0.597 ms
Execution time : 5.269 ms