explain.depesz.com

PostgreSQL's explain analyze made readable

Result: 3caK

Settings
# exclusive inclusive rows x rows loops node
1. 2.282 8.586 ↓ 4.2 1,573 1

Sort (cost=196.33..197.27 rows=378 width=3,916) (actual time=8.261..8.586 rows=1,573 loops=1)

  • Sort Key: "SiteReport".created_at DESC
  • Sort Method: quicksort Memory: 3219kB
2. 1.051 6.304 ↓ 4.2 1,573 1

Hash Left Join (cost=104.23..180.14 rows=378 width=3,916) (actual time=4.047..6.304 rows=1,573 loops=1)

  • Hash Cond: ("widgetResults->siteWidget".master_widget_id = "widgetResults->siteWidget->masterWidget".id)
3. 1.631 4.809 ↓ 4.2 1,573 1

Hash Right Join (cost=56.55..131.47 rows=378 width=2,643) (actual time=3.595..4.809 rows=1,573 loops=1)

  • Hash Cond: ("widgetResults->siteWidget".id = "widgetResults".site_widget_id)
4. 0.311 0.311 ↑ 1.0 1,379 1

Seq Scan on site_widgets "widgetResults->siteWidget" (cost=0.00..60.79 rows=1,379 width=212) (actual time=0.002..0.311 rows=1,379 loops=1)

5. 1.592 2.867 ↓ 4.2 1,573 1

Hash (cost=51.83..51.83 rows=378 width=2,431) (actual time=2.867..2.867 rows=1,573 loops=1)

  • Buckets: 2048 (originally 1024) Batches: 1 (originally 1) Memory Usage: 2056kB
6. 0.729 1.275 ↓ 4.2 1,573 1

Hash Left Join (cost=20.92..51.83 rows=378 width=2,431) (actual time=0.298..1.275 rows=1,573 loops=1)

  • Hash Cond: ("SiteReport".site_report_template_id = subscriptions.site_report_template_id)
7. 0.091 0.336 ↓ 3.0 121 1

Nested Loop Left Join (cost=9.58..35.72 rows=41 width=2,419) (actual time=0.080..0.336 rows=121 loops=1)

8. 0.018 0.179 ↓ 1.8 11 1

Nested Loop Left Join (cost=9.30..28.72 rows=6 width=2,403) (actual time=0.074..0.179 rows=11 loops=1)

9. 0.010 0.139 ↓ 1.8 11 1

Nested Loop Left Join (cost=9.15..27.00 rows=6 width=1,162) (actual time=0.067..0.139 rows=11 loops=1)

10. 0.003 0.081 ↑ 1.0 1 1

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

11. 0.031 0.074 ↑ 1.0 1 1

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

  • Hash Cond: ("siteReportTemplate".id = "SiteReport".site_report_template_id)
12. 0.021 0.021 ↑ 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.021 rows=69 loops=1)

13. 0.005 0.022 ↑ 1.0 1 1

Hash (cost=8.30..8.30 rows=1 width=129) (actual time=0.021..0.022 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.016..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=705) (actual time=0.004..0.004 rows=0 loops=1)

  • Index Cond: ("SiteReport".id = site_report_id)
16. 0.016 0.048 ↓ 1.6 11 1

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

17. 0.010 0.010 ↓ 1.6 11 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=11 loops=1)

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

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=11)

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

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

  • Index Cond: ("siteReportTemplate->_widgets".master_widget_id = id)
20. 0.066 0.066 ↓ 1.6 11 11

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=11 loops=11)

  • 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.003..0.104 rows=371 loops=1)

23. 0.249 0.444 ↑ 1.0 341 1

Hash (cost=43.41..43.41 rows=341 width=1,241) (actual time=0.444..0.444 rows=341 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 244kB
24. 0.195 0.195 ↑ 1.0 341 1

Seq Scan on master_widgets "widgetResults->siteWidget->masterWidget" (cost=0.00..43.41 rows=341 width=1,241) (actual time=0.003..0.195 rows=341 loops=1)

Planning time : 1.969 ms
Execution time : 9.043 ms