explain.depesz.com

PostgreSQL's explain analyze made readable

Result: ubJZ

Settings
# exclusive inclusive rows x rows loops node
1. 0.013 2.128 ↑ 1.0 100 1

Limit (cost=0.98..67.98 rows=100 width=17) (actual time=0.226..2.128 rows=100 loops=1)

2. 0.097 2.115 ↑ 3,406.8 100 1

Merge Join (cost=0.98..228,241.92 rows=340,677 width=17) (actual time=0.226..2.115 rows=100 loops=1)

  • Merge Cond: (contacts_tags_associations.contact_id = contacts.id)
3. 0.163 1.937 ↑ 4,266.8 100 1

Unique (cost=0.56..188,395.56 rows=426,682 width=26) (actual time=0.171..1.937 rows=100 loops=1)

4. 1.774 1.774 ↑ 4,830.9 882 1

Index Only Scan using contacts_tags_associations_pkey on contacts_tags_associations (cost=0.56..177,743.43 rows=4,260,850 width=26) (actual time=0.169..1.774 rows=882 loops=1)

  • Index Cond: ((company_id = '\x4c2118ad54397f271b000000'::bytea) AND (contact_id IS NOT NULL))
  • Heap Fetches: 882
5. 0.081 0.081 ↑ 10,425.6 100 1

Index Only Scan using ix_company_id_id on contacts (cost=0.43..28,499.65 rows=1,042,564 width=26) (actual time=0.048..0.081 rows=100 loops=1)

  • Index Cond: (company_id = '\x4c2118ad54397f271b000000'::bytea)
  • Heap Fetches: 0
Planning time : 0.738 ms
Execution time : 2.202 ms