explain.depesz.com

PostgreSQL's explain analyze made readable

Result: TC85

Settings
# exclusive inclusive rows x rows loops node
1. 2.772 8.444 ↓ 3.4 1,300 1

Sort (cost=196.16..197.11 rows=377 width=3,784) (actual time=8.156..8.444 rows=1,300 loops=1)

  • Sort Key: "SiteReport".created_at DESC
  • Sort Method: quicksort Memory: 2798kB
2. 0.893 5.672 ↓ 3.4 1,300 1

Hash Left Join (cost=104.20..180.03 rows=377 width=3,784) (actual time=3.766..5.672 rows=1,300 loops=1)

  • Hash Cond: ("widgetResults->siteWidget".master_widget_id = "widgetResults->siteWidget->masterWidget".id)
3. 1.402 4.246 ↓ 3.4 1,300 1

Hash Right Join (cost=56.55..131.38 rows=377 width=2,576) (actual time=3.213..4.246 rows=1,300 loops=1)

  • Hash Cond: ("widgetResults->siteWidget".id = "widgetResults".site_widget_id)
4. 0.341 0.341 ↓ 1.0 1,378 1

Seq Scan on site_widgets "widgetResults->siteWidget" (cost=0.00..60.75 rows=1,375 width=212) (actual time=0.003..0.341 rows=1,378 loops=1)

5. 1.383 2.503 ↓ 3.4 1,300 1

Hash (cost=51.83..51.83 rows=377 width=2,364) (actual time=2.503..2.503 rows=1,300 loops=1)

  • Buckets: 2048 (originally 1024) Batches: 1 (originally 1) Memory Usage: 1753kB
6. 0.616 1.120 ↓ 3.4 1,300 1

Hash Left Join (cost=20.92..51.83 rows=377 width=2,364) (actual time=0.285..1.120 rows=1,300 loops=1)

  • Hash Cond: ("SiteReport".site_report_template_id = subscriptions.site_report_template_id)
7. 0.071 0.297 ↓ 2.4 100 1

Nested Loop Left Join (cost=9.58..35.72 rows=41 width=2,352) (actual time=0.071..0.297 rows=100 loops=1)

8. 0.015 0.166 ↓ 1.7 10 1

Nested Loop Left Join (cost=9.30..28.73 rows=6 width=2,336) (actual time=0.065..0.166 rows=10 loops=1)

9. 0.010 0.131 ↓ 1.7 10 1

Nested Loop Left Join (cost=9.15..27.00 rows=6 width=1,160) (actual time=0.058..0.131 rows=10 loops=1)

10. 0.002 0.076 ↑ 1.0 1 1

Nested Loop Left Join (cost=8.60..22.40 rows=1 width=932) (actual time=0.045..0.076 rows=1 loops=1)

11. 0.028 0.070 ↑ 1.0 1 1

Hash Right Join (cost=8.31..11.27 rows=1 width=229) (actual time=0.038..0.070 rows=1 loops=1)

  • Hash Cond: ("siteReportTemplate".id = "SiteReport".site_report_template_id)
12. 0.022 0.022 ↑ 1.0 69 1

Seq Scan on site_report_templates "siteReportTemplate" (cost=0.00..2.69 rows=69 width=100) (actual time=0.005..0.022 rows=69 loops=1)

13. 0.003 0.020 ↑ 1.0 1 1

Hash (cost=8.30..8.30 rows=1 width=129) (actual time=0.020..0.020 rows=1 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 9kB
14. 0.017 0.017 ↑ 1.0 1 1

Index Scan using site_reports_uuid on site_reports "SiteReport" (cost=0.28..8.30 rows=1 width=129) (actual time=0.015..0.017 rows=1 loops=1)

  • Index Cond: (uuid = '0752abc8-884e-4b43-80a0-8a6e07318269'::text)
15. 0.004 0.004 ↓ 0.0 0 1

Index Scan using widget_results_site_report_id_idx on widget_results "widgetResults" (cost=0.29..11.04 rows=9 width=703) (actual time=0.004..0.004 rows=0 loops=1)

  • Index Cond: ("SiteReport".id = site_report_id)
16. 0.015 0.045 ↓ 1.4 10 1

Nested Loop (cost=0.56..4.54 rows=7 width=228) (actual time=0.010..0.045 rows=10 loops=1)

17. 0.010 0.010 ↓ 1.4 10 1

Index Scan using site_report_widgets_site_report_template_id_idx on site_report_widgets "siteReportTemplate->_widgets->SiteReportWidget" (cost=0.28..1.10 rows=7 width=16) (actual time=0.005..0.010 rows=10 loops=1)

  • Index Cond: ("siteReportTemplate".id = site_report_template_id)
18. 0.020 0.020 ↑ 1.0 1 10

Index Scan using site_widgets_id_idx on site_widgets "siteReportTemplate->_widgets" (cost=0.28..0.49 rows=1 width=212) (actual time=0.002..0.002 rows=1 loops=10)

  • Index Cond: (id = "siteReportTemplate->_widgets->SiteReportWidget".site_widget_id)
19. 0.020 0.020 ↑ 1.0 1 10

Index Scan using master_widgets_id_idx on master_widgets "siteReportTemplate->_widgets->masterWidget" (cost=0.15..0.29 rows=1 width=1,176) (actual time=0.002..0.002 rows=1 loops=10)

  • Index Cond: ("siteReportTemplate->_widgets".master_widget_id = id)
20. 0.060 0.060 ↓ 1.4 10 10

Index Scan using site_report_widgets_site_report_template_id_idx on site_report_widgets "siteReportTemplate->reportWidgetRelations" (cost=0.28..1.10 rows=7 width=16) (actual time=0.002..0.006 rows=10 loops=10)

  • Index Cond: ("siteReportTemplate".id = site_report_template_id)
21. 0.103 0.207 ↑ 1.1 352 1

Hash (cost=6.71..6.71 rows=371 width=12) (actual time=0.207..0.207 rows=352 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 24kB
22. 0.104 0.104 ↑ 1.0 371 1

Seq Scan on site_report_subscriptions subscriptions (cost=0.00..6.71 rows=371 width=12) (actual time=0.006..0.104 rows=371 loops=1)

23. 0.334 0.533 ↓ 1.0 341 1

Hash (cost=43.40..43.40 rows=340 width=1,176) (actual time=0.532..0.533 rows=341 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 244kB
24. 0.199 0.199 ↓ 1.0 341 1

Seq Scan on master_widgets "widgetResults->siteWidget->masterWidget" (cost=0.00..43.40 rows=340 width=1,176) (actual time=0.003..0.199 rows=341 loops=1)

Planning time : 1.915 ms
Execution time : 8.860 ms