explain.depesz.com

A tool for finding a real cause for slow queries.

Result: rsx

options
Did it help? Consider supporting us - Bitcoin address: 12v2hUztAk2LgzQ9H9LMwuU32urHMjZQnq
# exclusive inclusive rows x rows loops node
1. 0.009 34815.478 ↑ 1.0 10 1

Limit (cost=2262797.78..2262797.79 rows=10 width=13) (actual time=34815.467..34815.478 rows=10 loops=1)

2. 0.662 34815.469 ↑ 2.6 10 1

Sort (cost=2262797.78..2262797.79 rows=26 width=13) (actual time=34815.465..34815.469 rows=10 loops=1)

  • Sort Key: proposalindexinnerview.historical, donorproposal.mostrecentdonation
3. 215.103 34814.807 ↓ 11.3 295 1

Hash Join (cost=7821.04..2262797.72 rows=26 width=13) (actual time=209.190..34814.807 rows=295 loops=1)

  • Hash Cond: (proposalindexinnerview.proposalid = donorproposal.proposalid)
4. 34320.316 34598.384 ↓ 1.1 282907 1

Bitmap Heap Scan on dcproposal p (cost=7768.44..2261919.30 rows=254093 width=796) (actual time=192.454..34598.384 rows=282907 loops=1)

  • Recheck Cond: (((currentworkflowstatuscode = ANY ('{6,7,8,9}'::integer[])) AND (expirationdate > ('now'::text)::date) AND (NOT fullyfunded)) OR (currentworkflowstatuscode = ANY ('{11,12,13,14,15,16,17,18,19,20,21}'::integer[])) OR (currentworkflowstatuscode = 22))
  • Filter: (((expirationdate > ('now'::text)::date) AND (NOT fullyfunded) AND (currentworkflowstatuscode = ANY ('{6,7,8,9}'::integer[]))) OR (currentworkflowstatuscode = ANY ('{11,12,13,14,15,16,17,18,19,20,21}'::integer[])) OR ((currentworkflowstatuscode = 22) AND (subplan)))
5. 0.004 178.036 ↓ 0.0 0 1

BitmapOr (cost=7768.44..7768.44 rows=266763 width=0) (actual time=178.036..178.036 rows=0 loops=1)

6. 8.651 107.281 ↓ 0.0 0 1

BitmapAnd (cost=5518.53..5518.53 rows=4404 width=0) (actual time=107.281..107.281 rows=0 loops=1)

7. 4.849 4.849 ↓ 2.8 19737 1

Bitmap Index Scan on dcproposal_currentworkflowstatuscode_expirationdate (cost=0.00..87.25 rows=7072 width=0) (actual time=4.849..4.849 rows=19737 loops=1)

  • Index Cond: ((currentworkflowstatuscode = ANY ('{6,7,8,9}'::integer[])) AND (expirationdate > ('now'::text)::date))
8. 93.781 93.781 ↓ 1.0 465505 1

Bitmap Index Scan on dcproposal_fullyfunded_schoolid (cost=0.00..5418.55 rows=461923 width=0) (actual time=93.781..93.781 rows=465505 loops=1)

  • Index Cond: (fullyfunded = false)
9. 67.903 67.903 ↓ 1.0 251025 1

Bitmap Index Scan on dcproposal_currentworkflowstatuscode (cost=0.00..2072.51 rows=245562 width=0) (actual time=67.903..67.903 rows=251025 loops=1)

  • Index Cond: (currentworkflowstatuscode = ANY ('{11,12,13,14,15,16,17,18,19,20,21}'::integer[]))
10. 2.848 2.848 ↑ 1.0 16683 1

Bitmap Index Scan on dcproposal_currentworkflowstatuscode (cost=0.00..164.69 rows=16797 width=0) (actual time=2.848..2.848 rows=16683 loops=1)

  • Index Cond: (currentworkflowstatuscode = 22)
11.          

SubPlan (forBitmap Heap Scan)

12. 100.032 100.032 ↑ 1.0 1 16672

Index Scan using pk_proposalthankyou on proposalthankyou pty (cost=0.00..8.05 rows=1 width=683) (actual time=0.006..0.006 rows=1 loops=16672)

  • Index Cond: (proposalid = $0)
13. 0.229 1.320 ↓ 22.9 366 1

Hash (cost=52.58..52.58 rows=16 width=12) (actual time=1.320..1.320 rows=366 loops=1)

14. 1.091 1.091 ↓ 22.9 366 1

Index Scan using uix_donorproposal on donorproposal (cost=0.00..52.58 rows=16 width=12) (actual time=0.109..1.091 rows=366 loops=1)

  • Index Cond: (donorid = 5765)
  • Filter: (((amounttoproposal > 0::numeric) OR gcredemption) AND (proposalid <> 1500) AND (proposalid <> 5616))