explain.depesz.com

PostgreSQL's explain analyze made readable

Result: Ee2f : Optimization for: Optimization for: plan #2QsO; plan #cZdH

Settings

Optimization path:

Optimization(s) for this plan:

# exclusive inclusive rows x rows loops node
1. 0.027 2,092.706 ↑ 2.3 43 1

Limit (cost=38,869.39..42,995.77 rows=100 width=340) (actual time=823.758..2,092.706 rows=43 loops=1)

2. 2.422 2,092.679 ↑ 197.7 43 1

Nested Loop (cost=38,869.39..389,653.23 rows=8,501 width=340) (actual time=823.756..2,092.679 rows=43 loops=1)

3. 3.086 695.875 ↓ 1.2 1,713 1

HashAggregate (cost=38,868.82..38,883.41 rows=1,459 width=8) (actual time=694.486..695.875 rows=1,713 loops=1)

  • Group Key: individuals.id
4. 3.246 692.789 ↓ 1.2 1,713 1

Nested Loop (cost=3,896.05..38,865.17 rows=1,459 width=8) (actual time=32.924..692.789 rows=1,713 loops=1)

5. 2.226 564.494 ↓ 1.2 1,713 1

Nested Loop (cost=3,895.61..33,200.23 rows=1,459 width=4) (actual time=32.913..564.494 rows=1,713 loops=1)

6. 51.707 83.660 ↓ 1.1 1,014 1

Bitmap Heap Scan on super_individuals (cost=3,895.18..7,319.53 rows=898 width=4) (actual time=32.411..83.660 rows=1,014 loops=1)

  • Recheck Cond: ((employer_tsvector @@ '''facebook'':*'::tsquery) OR (employer_tsvector @@ '''google'':*'::tsquery))
  • Heap Blocks: exact=1025
7. 0.003 31.953 ↓ 0.0 0 1

BitmapOr (cost=3,895.18..3,895.18 rows=898 width=0) (actual time=31.953..31.953 rows=0 loops=1)

8. 16.902 16.902 ↓ 2.3 1,020 1

Bitmap Index Scan on ix_super_individuals_employer_tsvector (cost=0.00..1,947.37 rows=449 width=0) (actual time=16.902..16.902 rows=1,020 loops=1)

  • Index Cond: (employer_tsvector @@ '''facebook'':*'::tsquery)
9. 15.048 15.048 ↑ 64.1 7 1

Bitmap Index Scan on ix_super_individuals_employer_tsvector (cost=0.00..1,947.37 rows=449 width=0) (actual time=15.048..15.048 rows=7 loops=1)

  • Index Cond: (employer_tsvector @@ '''google'':*'::tsquery)
10. 478.608 478.608 ↑ 3.5 2 1,014

Index Scan using ix_individual_matches_super_individual_id on individual_matches (cost=0.43..28.75 rows=7 width=8) (actual time=0.469..0.472 rows=2 loops=1,014)

  • Index Cond: (super_individual_id = super_individuals.id)
11. 125.049 125.049 ↑ 1.0 1 1,713

Index Only Scan using individuals_pkey on individuals (cost=0.43..3.88 rows=1 width=4) (actual time=0.073..0.073 rows=1 loops=1,713)

  • Index Cond: (id = individual_matches.individual_id)
  • Heap Fetches: 536
12. 1,394.382 1,394.382 ↓ 0.0 0 1,713

Index Scan using ix_receipts_donor_individual_id on receipts (cost=0.56..240.36 rows=6 width=340) (actual time=0.813..0.814 rows=0 loops=1,713)

  • Index Cond: (donor_individual_id = individuals.id)
  • Filter: (recipient_committee_id = ANY ('{131597,131596,131595}'::integer[]))
  • Rows Removed by Filter: 5
Planning time : 1.667 ms
Execution time : 2,092.806 ms