explain.depesz.com

PostgreSQL's explain analyze made readable

Result: Q3t

Settings
# exclusive inclusive rows x rows loops node
1. 0.013 62.648 ↓ 17.0 17 1

Unique (cost=93.81..93.82 rows=1 width=16) (actual time=62.632..62.648 rows=17 loops=1)

2. 0.082 62.635 ↓ 81.0 81 1

Sort (cost=93.81..93.82 rows=1 width=16) (actual time=62.630..62.635 rows=81 loops=1)

  • Sort Key: pch.committee_type_id, pch.person_id
  • Sort Method: quicksort Memory: 28kB
3. 0.112 62.553 ↓ 81.0 81 1

Nested Loop (cost=5.33..93.80 rows=1 width=16) (actual time=0.137..62.553 rows=81 loops=1)

4. 0.113 61.631 ↓ 27.0 81 1

Nested Loop (cost=4.90..89.82 rows=3 width=24) (actual time=0.099..61.631 rows=81 loops=1)

5. 28.878 28.878 ↓ 17.0 17 1

Index Scan using person_committee_history_idx4 on person_committee_history pch (cost=0.42..61.64 rows=1 width=24) (actual time=0.028..28.878 rows=17 loops=1)

  • Index Cond: ((organization_id = 15302) AND (person_id = ANY ('{3442759,13636001,1207226,12503,308319,1342474,1254198,241823,339315,6948263,2571,461654,1997626}'::bigint[])))
  • Filter: (((is_former IS FALSE) OR (is_former IS NULL)) AND (committee_type_id = ANY ('{4001,4002,4003,4006}'::bigint[])) AND (committee_director_role_id = ANY ('{13000,13001,13002,13004,13007}'::bigint[])))
  • Rows Removed by Filter: 20
6. 0.323 32.640 ↑ 1.2 5 17

Bitmap Heap Scan on person_committee_history_source pchs (cost=4.47..28.12 rows=6 width=16) (actual time=1.917..1.920 rows=5 loops=17)

  • Recheck Cond: (person_committee_history_id = pch.id)
  • Heap Blocks: exact=18
7. 32.317 32.317 ↑ 1.2 5 17

Bitmap Index Scan on person_committee_history_source_person_committee_history_id_idx (cost=0.00..4.47 rows=6 width=0) (actual time=1.901..1.901 rows=5 loops=17)

  • Index Cond: (person_committee_history_id = pch.id)
8. 0.810 0.810 ↑ 1.0 1 81

Index Scan using person_committee_pk on person_committee pc (cost=0.43..1.33 rows=1 width=8) (actual time=0.010..0.010 rows=1 loops=81)

  • Index Cond: (id = pchs.person_committee_id)
  • Filter: (((is_delete IS NULL) OR (NOT is_delete)) AND (source = ANY ('{1002,1003,1021,1028,1029}'::bigint[])))