explain.depesz.com

PostgreSQL's explain analyze made readable

Result: oiX1

Settings
# exclusive inclusive rows x rows loops node
1. 0.000 0.000 ↓ 0.0

Limit (cost=8,247.00..8,247.00 rows=1 width=169) (actual rows= loops=)

2. 0.000 0.000 ↓ 0.0

Sort (cost=8,247.00..8,247.00 rows=1 width=169) (actual rows= loops=)

  • Sort Key: reports.created_at DESC
3. 0.000 0.000 ↓ 0.0

Unique (cost=8,246.97..8,246.98 rows=1 width=169) (actual rows= loops=)

4. 0.000 0.000 ↓ 0.0

Sort (cost=8,246.97..8,246.97 rows=1 width=169) (actual rows= loops=)

  • Sort Key: reports.id
5. 0.000 0.000 ↓ 0.0

Nested Loop Semi Join (cost=2.29..8,246.96 rows=1 width=169) (actual rows= loops=)

  • Join Filter: (reports_plans.id = (udf_authorized_plan_ids(2152, true)))
6. 0.000 0.000 ↓ 0.0

Nested Loop Left Join (cost=2.29..8,219.19 rows=1 width=165) (actual rows= loops=)

7. 0.000 0.000 ↓ 0.0

Nested Loop (cost=1.87..8,218.42 rows=1 width=165) (actual rows= loops=)

8. 0.000 0.000 ↓ 0.0

Hash Left Join (cost=1.45..8,216.12 rows=1 width=161) (actual rows= loops=)

  • Hash Cond: (reports.id = reports_report_feedbacks.report_id)
  • Filter: (reports_report_feedbacks.adv_fees_change_picklist_id IS NULL)
9. 0.000 0.000 ↓ 0.0

Seq Scan on reports (cost=0.00..8,105.95 rows=41,417 width=161) (actual rows= loops=)

  • Filter: ((deleted_at IS NULL) AND (archived_at IS NULL) AND (latest_final_report_generation_id IS NOT NULL) AND (report_type_id = ANY ('{1,9,27}'::integer[])) AND (report_status_id = ANY ('{1,5,8,14,15,16,17}'::integer[])))
10. 0.000 0.000 ↓ 0.0

Hash (cost=1.20..1.20 rows=20 width=8) (actual rows= loops=)

11. 0.000 0.000 ↓ 0.0

Seq Scan on report_feedbacks reports_report_feedbacks (cost=0.00..1.20 rows=20 width=8) (actual rows= loops=)

12. 0.000 0.000 ↓ 0.0

Index Scan using plans_pkey on plans reports_plans (cost=0.42..2.30 rows=1 width=8) (actual rows= loops=)

  • Index Cond: (id = reports.plan_id)
  • Filter: (NOT is_prospect)
13. 0.000 0.000 ↓ 0.0

Index Scan using index_report_generations_on_report_id on report_generations reports_report_generations (cost=0.42..0.75 rows=2 width=8) (actual rows= loops=)

  • Index Cond: (report_id = reports.id)
14. 0.000 0.000 ↓ 0.0

ProjectSet (cost=0.00..5.27 rows=1,000 width=4) (actual rows= loops=)

15. 0.000 0.000 ↓ 0.0

Result (cost=0.00..0.01 rows=1 width=0) (actual rows= loops=)