explain.depesz.com

PostgreSQL's explain analyze made readable

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

Settings

Optimization path:

# exclusive inclusive rows x rows loops node
1. 0.017 55.644 ↑ 2.3 43 1

Limit (cost=389,978.14..389,978.39 rows=100 width=340) (actual time=55.620..55.644 rows=43 loops=1)

2. 0.067 55.627 ↑ 197.7 43 1

Sort (cost=389,978.14..389,999.39 rows=8,501 width=340) (actual time=55.619..55.627 rows=43 loops=1)

  • Sort Key: receipts.contribution_amount DESC
  • Sort Method: quicksort Memory: 47kB
3. 1.097 55.560 ↑ 197.7 43 1

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

4. 1.404 44.185 ↓ 1.2 1,713 1

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

  • Group Key: individuals.id
5. 1.269 42.781 ↓ 1.2 1,713 1

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

6. 1.305 36.373 ↓ 1.2 1,713 1

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

7. 1.443 31.012 ↓ 1.1 1,014 1

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

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

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

9. 15.372 15.372 ↓ 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=15.372..15.372 rows=1,020 loops=1)

  • Index Cond: (employer_tsvector @@ '''facebook'':*'::tsquery)
10. 14.195 14.195 ↑ 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=14.195..14.195 rows=7 loops=1)

  • Index Cond: (employer_tsvector @@ '''google'':*'::tsquery)
11. 4.056 4.056 ↑ 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.003..0.004 rows=2 loops=1,014)

  • Index Cond: (super_individual_id = super_individuals.id)
12. 5.139 5.139 ↑ 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.003..0.003 rows=1 loops=1,713)

  • Index Cond: (id = individual_matches.individual_id)
  • Heap Fetches: 536
13. 10.278 10.278 ↓ 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.006..0.006 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.676 ms
Execution time : 55.735 ms