explain.depesz.com

PostgreSQL's explain analyze made readable

Result: LV5v

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

Sort (cost=8.07..8.08 rows=2 width=432) (actual time=0.024..0.024 rows=0 loops=1)

  • Sort Key: contacts_notes.created DESC
  • Sort Method: quicksort Memory: 25kB
2. 0.001 0.022 ↓ 0.0 0 1

GroupAggregate (cost=0.57..8.06 rows=2 width=432) (actual time=0.022..0.022 rows=0 loops=1)

  • Group Key: contacts_notes.company_id, contacts_notes.note_id
3. 0.002 0.021 ↓ 0.0 0 1

Nested Loop (cost=0.57..8.02 rows=2 width=413) (actual time=0.021..0.021 rows=0 loops=1)

4. 0.012 0.012 ↑ 2.0 1 1

Index Only Scan using contacts_notes_associations_pkey on contacts_notes_associations (cost=0.29..3.01 rows=2 width=39) (actual time=0.012..0.012 rows=1 loops=1)

  • Index Cond: ((company_id = '\x4c2118ad54397f271b000000'::bytea) AND (contact_id = '\x4d0387afa71d3325710001d3'::bytea))
  • Heap Fetches: 1
5. 0.007 0.007 ↓ 0.0 0 1

Index Scan using idx_contacts_notes_company_note_created on contacts_notes (cost=0.29..2.51 rows=1 width=400) (actual time=0.007..0.007 rows=0 loops=1)

  • Index Cond: ((company_id = '\x4c2118ad54397f271b000000'::bytea) AND (note_id = contacts_notes_associations.note_id) AND (created < '2020-01-21 22:13:02.873+00'::timestamp with time zone))
Planning time : 0.287 ms
Execution time : 0.061 ms