explain.depesz.com

PostgreSQL's explain analyze made readable

Result: Bxtf

Settings
# exclusive inclusive rows x rows loops node
1. 0.049 2.870 ↑ 1.0 1 1

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

2. 0.077 2.821 ↑ 7.2 123 1

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

3. 0.024 1.514 ↑ 9.0 123 1

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

4. 0.045 0.045 ↑ 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.044..0.045 rows=1 loops=1)

  • Index Cond: ((company_id = '\x4c2118ad54397f271b000000'::bytea) AND (tag = '00_bulk_131'::text))
5. 1.445 1.445 ↑ 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=1.362..1.445 rows=123 loops=1)

  • Index Cond: ((company_id = '\x4c2118ad54397f271b000000'::bytea) AND (tag_id = contacts_tags.id))
  • Heap Fetches: 123
6. 1.230 1.230 ↑ 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.010..0.010 rows=1 loops=123)

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