explain.depesz.com

PostgreSQL's explain analyze made readable

Result: 18ih

Settings
# exclusive inclusive rows x rows loops node
1. 0.002 0.021 ↓ 0.0 0 1

Limit (cost=37.53..45.31 rows=1 width=255) (actual time=0.021..0.021 rows=0 loops=1)

2. 0.006 0.019 ↓ 0.0 0 1

Nested Loop (cost=37.53..45.31 rows=1 width=255) (actual time=0.019..0.019 rows=0 loops=1)

  • Join Filter: (contacts.id = contacts_1.id)
3. 0.013 0.013 ↓ 0.0 0 1

Index Scan using contacts_pkey on contacts (cost=23.26..31.01 rows=1 width=255) (actual time=0.013..0.013 rows=0 loops=1)

  • Index Cond: (id > 36085)
  • Filter: ((deleted_at IS NULL) AND (state <> 2) AND (NOT (hashed SubPlan 1)))
4.          

SubPlan (for Index Scan)

5. 0.000 0.000 ↓ 0.0 0

Nested Loop Anti Join (cost=14.84..22.97 rows=1 width=4) (never executed)

6. 0.000 0.000 ↓ 0.0 0

Nested Loop (cost=14.56..22.61 rows=1 width=4) (never executed)

7. 0.000 0.000 ↓ 0.0 0

HashAggregate (cost=14.27..14.28 rows=1 width=4) (never executed)

8. 0.000 0.000 ↓ 0.0 0

Nested Loop (cost=0.57..14.27 rows=1 width=4) (never executed)

9. 0.000 0.000 ↓ 0.0 0

Index Scan using index_contacts_lists_on_list_id on contacts_lists contacts_lists_1 (cost=0.29..5.95 rows=1 width=4) (never executed)

  • Index Cond: (list_id = 327)
10. 0.000 0.000 ↓ 0.0 0

Index Scan using contacts_pkey on contacts contacts_3 (cost=0.29..8.31 rows=1 width=4) (never executed)

  • Index Cond: (id = contacts_lists_1.contact_id)
  • Filter: ((deleted_at IS NULL) AND (state <> 2) AND (state = 1))
11. 0.000 0.000 ↓ 0.0 0

Index Scan using contacts_pkey on contacts contacts_2 (cost=0.29..8.31 rows=1 width=4) (never executed)

  • Index Cond: (id = contacts_3.id)
  • Filter: ((deleted_at IS NULL) AND (state <> 2))
12. 0.000 0.000 ↓ 0.0 0

Index Only Scan using index_contact_classifications_on_contact_id on contact_classifications (cost=0.29..0.36 rows=1 width=4) (never executed)

  • Index Cond: (contact_id = contacts_2.id)
  • Heap Fetches: 0
13. 0.000 0.000 ↓ 0.0 0

HashAggregate (cost=14.27..14.28 rows=1 width=4) (never executed)

14. 0.000 0.000 ↓ 0.0 0

Nested Loop (cost=0.57..14.27 rows=1 width=4) (never executed)

15. 0.000 0.000 ↓ 0.0 0

Index Scan using index_contacts_lists_on_list_id on contacts_lists (cost=0.29..5.95 rows=1 width=4) (never executed)

  • Index Cond: (list_id = 327)
16. 0.000 0.000 ↓ 0.0 0

Index Scan using contacts_pkey on contacts contacts_1 (cost=0.29..8.31 rows=1 width=4) (never executed)

  • Index Cond: (id = contacts_lists.contact_id)
  • Filter: ((deleted_at IS NULL) AND (state <> 2) AND (state = 1))