explain.depesz.com

PostgreSQL's explain analyze made readable

Result: SbpJ

Settings
# exclusive inclusive rows x rows loops node
1. 1.275 156.151 ↑ 1.0 1 1

Aggregate (cost=93,634.59..93,634.60 rows=1 width=8) (actual time=156.150..156.151 rows=1 loops=1)

2. 46.583 154.876 ↓ 2.9 17,679 1

Nested Loop (cost=0.87..93,619.31 rows=6,114 width=0) (actual time=0.088..154.876 rows=17,679 loops=1)

3. 5.497 48.382 ↓ 6.2 59,911 1

Nested Loop (cost=0.43..80,260.61 rows=9,590 width=4) (actual time=0.024..48.382 rows=59,911 loops=1)

4. 9.006 9.006 ↓ 1.8 23 1

Seq Scan on survey_surveyinstance (cost=0.00..5,504.49 rows=13 width=4) (actual time=0.010..9.006 rows=23 loops=1)

  • Filter: ((final_date_time < now()) AND (final_date_time > (now() - '7 days'::interval)))
  • Rows Removed by Filter: 12,710
5. 33.879 33.879 ↓ 1.2 2,605 23

Index Scan using survey_surveytaker_instance_id on survey_surveytaker t (cost=0.43..5,728.27 rows=2,220 width=8) (actual time=0.011..1.473 rows=2,605 loops=23)

  • Index Cond: (instance_id = survey_surveyinstance.id)
6. 59.911 59.911 ↓ 0.0 0 59,911

Index Only Scan using survey_takercomment_81e8199a on survey_takercomment c (cost=0.43..1.05 rows=34 width=4) (actual time=0.001..0.001 rows=0 loops=59,911)

  • Index Cond: (taker_id = t.id)
  • Heap Fetches: 17,679
Planning time : 0.563 ms
Execution time : 156.189 ms