explain.depesz.com

A tool for finding a real cause for slow queries.

Result: RsKx : proposal_search

options
exclusive inclusive rows x rows loops node
10.975 262986.525 ↓ 70.7 8908 1

Unique (cost=103652.62..103653.03 rows=126 width=112) (actual time=262971.974..262986.525 rows=8908 loops=1)

73.195 262975.550 ↓ 70.7 8908 1

Sort (cost=103652.62..103652.65 rows=126 width=112) (actual time=262971.971..262975.550 rows=8908 loops=1)

  • Sort Key: workflowst2_.id, dcproposal0_.currentworkflowstatuscreated, dcproposal0_.proposalid, dcproposal0_.title, dcproposal0_.created, dcproposal0_.expirationdate, dcproposal0_.materialprice, dcproposal0_.fullyfunded, user1_.personid, user1_1_."first", user1_1_."last", workflowst2_.status
25.280 262902.355 ↓ 70.7 8908 1

Nested Loop (cost=2152.68..103652.18 rows=126 width=112) (actual time=998.471..262902.355 rows=8908 loops=1)

23.768 187346.143 ↓ 70.7 8908 1

Nested Loop (cost=2152.68..103614.13 rows=126 width=116) (actual time=961.264..187346.143 rows=8908 loops=1)

25.630 176828.751 ↓ 70.7 8908 1

Nested Loop Left Join (cost=2152.68..103580.76 rows=126 width=93) (actual time=951.996..176828.751 rows=8908 loops=1)

47.944 174397.961 ↓ 70.7 8908 1

Nested Loop (cost=2152.68..103543.59 rows=126 width=97) (actual time=886.269..174397.961 rows=8908 loops=1)

77.182 5611.073 ↓ 5.0 16687 1

Hash Join (cost=2152.68..100865.61 rows=3346 width=93) (actual time=718.031..5611.073 rows=16687 loops=1)

  • Hash Cond: (dcproposal0_.currentworkflowstatuscode = workflowst2_.id)
502.137 5499.859 ↓ 6.3 50631 1

Hash Join (cost=2151.57..100858.14 rows=8030 width=71) (actual time=683.826..5499.859 rows=50631 loops=1)

  • Hash Cond: (dcproposal0_.schoolid = school4_.schoolid)
4314.202 4314.202 ↑ 1.0 683303 1

Seq Scan on dcproposal dcproposal0_ (cost=0.00..98442.30 rows=683303 width=75) (actual time=0.036..4314.202 rows=683303 loops=1)

0.898 683.520 ↓ 1.0 1215 1

Hash (cost=2150.07..2150.07 rows=1196 width=4) (actual time=683.520..683.520 rows=1215 loops=1)

644.184 682.622 ↓ 1.0 1215 1

Bitmap Heap Scan on school school4_ (cost=12.96..2150.07 rows=1196 width=4) (actual time=54.561..682.622 rows=1215 loops=1)

  • Recheck Cond: (districtid = 5194)
38.438 38.438 ↓ 1.0 1215 1

Bitmap Index Scan on school_altindex4 (cost=0.00..12.93 rows=1196 width=0) (actual time=38.438..38.438 rows=1215 loops=1)

  • Index Cond: (districtid = 5194)
0.014 34.032 ↓ 1.2 12 1

Hash (cost=1.10..1.10 rows=10 width=24) (actual time=34.032..34.032 rows=12 loops=1)

34.018 34.018 ↓ 1.2 12 1

Seq Scan on workflowstatus workflowst2_ (cost=0.00..1.10 rows=10 width=24) (actual time=34.006..34.018 rows=12 loops=1)

  • Filter: ((id = 11) OR (id = 12) OR (id = 13) OR (id = 14) OR (id = 15) OR (id = 16) OR (id = 17) OR (id = 18) OR (id = 19) OR (id = 20) OR (id = 21) OR (id = 22))
168738.944 168738.944 ↑ 1.0 1 16687

Index Scan using proposalworkflowstatus_altindex2 on proposalworkflowstatus proposalwo3_ (cost=0.00..0.80 rows=1 width=8) (actual time=9.995..10.112 rows=1 loops=16687)

  • Index Cond: (dcproposal0_.proposalid = proposalwo3_.proposalid)
  • Filter: ((workflowstatusid = 10) AND (datecreated >= '2011-11-04 00:00:00'::timestamp without time zone) AND (datecreated < '2012-02-02 00:00:00'::timestamp without time zone))
2405.160 2405.160 ↓ 0.0 0 8908

Index Scan using pk_proposalworkflowstatusreasonindraft on proposalworkflowstatusreasonindraft proposalwo3_1_ (cost=0.00..0.29 rows=1 width=4) (actual time=0.270..0.270 rows=0 loops=8908)

  • Index Cond: (proposalwo3_.id = proposalwo3_1_.proposalworkflowstatusid)
10493.624 10493.624 ↑ 1.0 1 8908

Index Scan using pk_person on person user1_1_ (cost=0.00..0.26 rows=1 width=23) (actual time=1.176..1.178 rows=1 loops=8908)

  • Index Cond: (user1_1_.personid = dcproposal0_.createduserid)
75530.932 75530.932 ↑ 1.0 1 8908

Index Scan using pk_appuser on appuser user1_ (cost=0.00..0.30 rows=1 width=4) (actual time=8.467..8.479 rows=1 loops=8908)

  • Index Cond: (dcproposal0_.createduserid = user1_.personid)