explain.depesz.com

PostgreSQL's explain analyze made readable

Result: ZvGQ

Settings
# exclusive inclusive rows x rows loops node
1. 2.762 8.373 ↓ 3.4 1,300 1

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

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

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

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

Hash Right Join (cost=56.55..131.38 rows=377 width=2,576) (actual time=3.140..4.175 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.299 2.422 ↓ 3.4 1,300 1

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

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

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

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

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

8. 0.017 0.176 ↓ 1.7 10 1

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

9. 0.010 0.139 ↓ 1.7 10 1

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

10. 0.003 0.081 ↑ 1.0 1 1

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

11. 0.029 0.074 ↑ 1.0 1 1

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

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

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

13. 0.004 0.022 ↑ 1.0 1 1

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

  • Buckets: 1024 Batches: 1 Memory Usage: 9kB
14. 0.018 0.018 ↑ 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.017..0.018 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.018 0.048 ↓ 1.4 10 1

Nested Loop (cost=0.56..4.54 rows=7 width=228) (actual time=0.011..0.048 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.106 0.210 ↑ 1.1 352 1

Hash (cost=6.71..6.71 rows=371 width=12) (actual time=0.210..0.210 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.323 0.524 ↓ 1.0 341 1

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

  • Buckets: 1024 Batches: 1 Memory Usage: 244kB
24. 0.201 0.201 ↓ 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.004..0.201 rows=341 loops=1)

Planning time : 1.983 ms
Execution time : 8.806 ms