explain.depesz.com

PostgreSQL's explain analyze made readable

Result: GPpS

Settings
# exclusive inclusive rows x rows loops node
1. 0.009 12,958.067 ↑ 1.0 1 1

Aggregate (cost=1,271.62..1,271.63 rows=1 width=8) (actual time=12,958.067..12,958.067 rows=1 loops=1)

  • Output: count(*)
  • Buffers: shared hit=16620178
2. 0.000 12,958.058 ↓ 26.0 26 1

Nested Loop (cost=1.85..1,271.62 rows=1 width=0) (actual time=148.615..12,958.058 rows=26 loops=1)

  • Buffers: shared hit=16620178
3. 669.466 3,396.579 ↓ 52,457.2 5,193,259 1

Nested Loop (cost=1.42..1,224.73 rows=99 width=4) (actual time=0.063..3,396.579 rows=5,193,259 loops=1)

  • Output: cards.id
  • Buffers: shared hit=1018730
4. 0.306 4.676 ↓ 81.4 1,709 1

Nested Loop (cost=0.85..100.35 rows=21 width=4) (actual time=0.032..4.676 rows=1,709 loops=1)

  • Output: phases.id
  • Buffers: shared hit=1308
5. 1.708 1.708 ↓ 34.6 242 1

Index Scan using idx_r_on_organization_id_deleted_at on public.repos (cost=0.42..10.42 rows=7 width=4) (actual time=0.020..1.708 rows=242 loops=1)

  • Output: repos.id
  • Index Cond: ((repos.organization_id = 64103) AND (repos.deleted_at IS NULL))
  • Filter: ((repos.type)::text = 'Pipe'::text)
  • Rows Removed by Filter: 61
  • Buffers: shared hit=190
6. 2.662 2.662 ↑ 1.1 7 242

Index Scan using index_phases_on_repo_id_and_index on public.phases (cost=0.43..12.77 rows=8 width=8) (actual time=0.006..0.011 rows=7 loops=242)

  • Output: phases.id, phases.repo_id
  • Index Cond: ((phases.repo_id = repos.id) AND (phases.index > '0'::numeric))
  • Filter: (NOT phases.done)
  • Rows Removed by Filter: 2
  • Buffers: shared hit=1118
7. 2,722.437 2,722.437 ↓ 1.6 3,039 1,709

Index Scan using index_cards_on_current_phase_id_and_index on public.cards (cost=0.56..34.41 rows=1,913 width=8) (actual time=0.004..1.593 rows=3,039 loops=1,709)

  • Output: cards.id, cards.current_phase_id, cards.title, cards.created_at, cards.updated_at, cards.due_date, cards.deleted_at, cards.started_at, cards.created_by_id, cards.index, cards.finished_at, cards.comments_count, cards.attachments_count, cards.suid, cards.default_to_email, cards.repo_items_importation_id, cards.tmp_import_id, cards.public_form_submitter_email
  • Index Cond: (cards.current_phase_id = phases.id)
  • Buffers: shared hit=1017422
8. 10,386.518 10,386.518 ↓ 0.0 0 5,193,259

Index Only Scan using index_card_assignees_on_card_id_and_assignee_id on public.card_assignees (cost=0.43..0.46 rows=1 width=4) (actual time=0.002..0.002 rows=0 loops=5,193,259)

  • Output: card_assignees.card_id, card_assignees.assignee_id
  • Index Cond: ((card_assignees.card_id = cards.id) AND (card_assignees.assignee_id = 849860))
  • Heap Fetches: 26
  • Buffers: shared hit=15601448
Planning time : 2.327 ms
Execution time : 12,958.149 ms