explain.depesz.com

PostgreSQL's explain analyze made readable

Result: ar1f

Settings
# exclusive inclusive rows x rows loops node
1. 0.004 21,606.796 ↑ 1.0 1 1

Aggregate (cost=3,596.45..3,596.46 rows=1 width=8) (actual time=21,606.796..21,606.796 rows=1 loops=1)

  • Output: count(*)
  • Buffers: shared hit=2,431,897
2. 42.253 21,606.792 ↓ 2.0 2 1

Nested Loop (cost=1.86..3,596.45 rows=1 width=0) (actual time=21,404.168..21,606.792 rows=2 loops=1)

  • Inner Unique: true
  • Buffers: shared hit=2,431,897
3. 14.388 21,424.340 ↓ 251.3 46,733 1

Nested Loop (cost=1.42..3,510.90 rows=186 width=4) (actual time=0.072..21,424.340 rows=46,733 loops=1)

  • Output: cards.id
  • Buffers: shared hit=2,291,439
4. 0.210 36.155 ↓ 9.3 353 1

Nested Loop (cost=0.86..348.15 rows=38 width=4) (actual time=0.041..36.155 rows=353 loops=1)

  • Output: phases.id
  • Buffers: shared hit=528
5. 30.185 30.185 ↓ 7.3 80 1

Index Scan using idx_r_on_organization_id_deleted_at_2 on public.repos (cost=0.42..14.44 rows=11 width=4) (actual time=0.026..30.185 rows=80 loops=1)

  • Output: repos.id, repos.name, repos.created_at, repos.updated_at, repos.organization_id, repos.title_field_id, repos.expiration_time, repos.deleted_at, repos.created_by_id, repos.only_admin_can_remove_cards, repos.cloning, repos.clone_from_id, repos.public, repos.only_assignees_can_edit_cards, repos.cards_count, repos.users_count, repos.anyone_can_create_card, repos.subtitles, repos.icon, repos.create_card_label, repos.email_inbox_name, repos.type, repos.description, repos.slug, repos."authorization", repos.count_only_week_days, repos.suid, repos.uuid, repos.organization_uuid
  • Index Cond: ((repos.organization_id = 330,318) AND (repos.deleted_at IS NULL))
  • Filter: ((repos.type)::text = 'Pipe'::text)
  • Rows Removed by Filter: 1
  • Buffers: shared hit=22
6. 5.760 5.760 ↑ 4.8 4 80

Index Scan using index_phases_on_repo_id_and_index on public.phases (cost=0.43..30.15 rows=19 width=8) (actual time=0.060..0.072 rows=4 loops=80)

  • Output: phases.id, phases.name, phases.repo_id, phases.index, phases.created_at, phases.updated_at, phases.done, phases.lateness_time, phases.deleted_at, phases.description, phases.only_admin_can_move_to_previous, phases.can_receive_card_directly_from_draft, phases.sequential_id, phases.uuid, phases.custom_sorting_preferences
  • Index Cond: ((phases.repo_id = repos.id) AND (phases.index > '0'::numeric))
  • Filter: (NOT phases.done)
  • Rows Removed by Filter: 2
  • Buffers: shared hit=506
7. 21,373.797 21,373.797 ↑ 22.6 132 353

Index Scan using idx_c_on_current_phase_id_due_date_deleted_at on public.cards (cost=0.56..53.38 rows=2,985 width=8) (actual time=0.012..60.549 rows=132 loops=353)

  • 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, cards.uuid
  • Index Cond: (cards.current_phase_id = phases.id)
  • Buffers: shared hit=2,290,911
8. 140.199 140.199 ↓ 0.0 0 46,733

Index Only Scan using index_card_assignees_on_card_id_and_assignee_id on public.card_assignees (cost=0.44..0.46 rows=1 width=4) (actual time=0.003..0.003 rows=0 loops=46,733)

  • Output: card_assignees.card_id, card_assignees.assignee_id
  • Index Cond: ((card_assignees.card_id = cards.id) AND (card_assignees.assignee_id = 935,556))
  • Heap Fetches: 0
  • Buffers: shared hit=140,458
Planning time : 2.147 ms
Execution time : 21,607.568 ms