explain.depesz.com

PostgreSQL's explain analyze made readable

Result: 8pzb : COUNT IS

Settings
# exclusive inclusive rows x rows loops node
1. 0.050 1.644 ↑ 1.0 1 1

Aggregate (cost=1,936.07..1,936.08 rows=1 width=8) (actual time=1.644..1.644 rows=1 loops=1)

2. 0.144 1.594 ↑ 7.2 123 1

Nested Loop (cost=1.27..1,933.85 rows=888 width=0) (actual time=0.241..1.594 rows=123 loops=1)

3. 0.037 0.343 ↑ 9.0 123 1

Nested Loop (cost=0.84..1,432.89 rows=1,112 width=26) (actual time=0.204..0.343 rows=123 loops=1)

4. 0.041 0.041 ↑ 1.0 1 1

Index Scan using ix_contacts_tags_company_id_tag on contacts_tags (cost=0.28..2.50 rows=1 width=26) (actual time=0.040..0.041 rows=1 loops=1)

  • Index Cond: ((company_id = '\x4c2118ad54397f271b000000'::bytea) AND (tag = '00_bulk_131'::text))
5. 0.265 0.265 ↑ 22.4 123 1

Index Only Scan using ix_contacts_tags_associations_company_id_tag_id_contact_id on contacts_tags_associations (cost=0.56..1,402.83 rows=2,756 width=39) (actual time=0.142..0.265 rows=123 loops=1)

  • Index Cond: ((company_id = '\x4c2118ad54397f271b000000'::bytea) AND (tag_id = contacts_tags.id))
  • Heap Fetches: 123
6. 1.107 1.107 ↑ 1.0 1 123

Index Only Scan using ix_company_id_id on contacts (cost=0.43..0.45 rows=1 width=26) (actual time=0.009..0.009 rows=1 loops=123)

  • Index Cond: ((company_id = '\x4c2118ad54397f271b000000'::bytea) AND (id = contacts_tags_associations.contact_id))
  • Heap Fetches: 0
Planning time : 1.495 ms
Execution time : 1.741 ms