explain.depesz.com

PostgreSQL's explain analyze made readable

Result: W9wg

Settings
# exclusive inclusive rows x rows loops node
1. 0.005 19,783.520 ↑ 1.0 1 1

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

  • Output: count(*)
  • Buffers: shared hit=2432176
2. 63.807 19,783.515 ↓ 2.0 2 1

Nested Loop (cost=1.86..3,596.45 rows=1 width=0) (actual time=19,517.165..19,783.515 rows=2 loops=1)

  • Inner Unique: true
  • Buffers: shared hit=2432176
3. 9.357 19,392.577 ↓ 251.3 46,733 1

Nested Loop (cost=1.42..3,510.90 rows=186 width=4) (actual time=0.065..19,392.577 rows=46,733 loops=1)

  • Output: cards.id
  • Buffers: shared hit=2291718
4. 0.188 2.461 ↓ 9.3 353 1

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

  • Output: phases.id
  • Buffers: shared hit=528
5. 0.753 0.753 ↓ 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.027..0.753 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 = 330318) AND (repos.deleted_at IS NULL))
  • Filter: ((repos.type)::text = 'Pipe'::text)
  • Rows Removed by Filter: 1
  • Buffers: shared hit=22
6. 1.520 1.520 ↑ 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.008..0.019 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. 19,380.759 19,380.759 ↑ 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.011..54.903 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=2291190
8. 327.131 327.131 ↓ 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.007..0.007 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 = 935556))
  • Heap Fetches: 0
  • Buffers: shared hit=140458
Planning time : 4.498 ms
Execution time : 19,784.025 ms