explain.depesz.com

PostgreSQL's explain analyze made readable

Result: cp9i

Settings
# exclusive inclusive rows x rows loops node
1. 0.247 25.628 ↓ 33.0 33 1

Sort (cost=5,084.65..5,084.66 rows=1 width=872) (actual time=25.615..25.628 rows=33 loops=1)

  • Sort Key: surveys.scheduling_date
  • Sort Method: quicksort Memory: 32kB
2. 0.148 25.381 ↓ 33.0 33 1

Nested Loop (cost=47.61..5,084.64 rows=1 width=872) (actual time=0.836..25.381 rows=33 loops=1)

3. 1.496 24.783 ↓ 45.0 45 1

Nested Loop (cost=47.46..5,084.47 rows=1 width=872) (actual time=0.812..24.783 rows=45 loops=1)

4. 1.951 13.017 ↓ 790.0 790 1

Nested Loop (cost=47.04..5,076.41 rows=1 width=8) (actual time=0.622..13.017 rows=790 loops=1)

5. 2.814 3.166 ↓ 1.6 790 1

Bitmap Heap Scan on budgets surveyable (cost=46.62..3,015.11 rows=482 width=4) (actual time=0.579..3.166 rows=790 loops=1)

  • Recheck Cond: (workshop_id = 1,549)
  • Filter: ((type)::text = 'InsurerBudget'::text)
  • Heap Blocks: exact=372
6. 0.352 0.352 ↑ 1.0 790 1

Bitmap Index Scan on index_budgets_on_workshop_id (cost=0.00..46.50 rows=810 width=0) (actual time=0.351..0.352 rows=790 loops=1)

  • Index Cond: (workshop_id = 1,549)
7. 7.900 7.900 ↑ 1.0 1 790

Index Only Scan using budgets_id_workshop_id_idx on budgets (cost=0.42..4.28 rows=1 width=4) (actual time=0.010..0.010 rows=1 loops=790)

  • Index Cond: ((id = surveyable.id) AND (workshop_id = 1,549))
  • Heap Fetches: 0
8. 10.270 10.270 ↓ 0.0 0 790

Index Scan using index_surveys_on_surveyable_id on surveys (cost=0.42..8.05 rows=1 width=872) (actual time=0.013..0.013 rows=0 loops=790)

  • Index Cond: (surveyable_id = budgets.id)
  • Filter: (((date_preview_workshop IS NULL) OR (date_preview_workshop >= '2020-09-13 00:00:00'::timestamp without time zone)) AND ((surveyable_type)::text = 'Budget'::text) AND ((current_status)::text = 'analyzed'::text))
  • Rows Removed by Filter: 1
9. 0.450 0.450 ↑ 1.0 1 45

Index Scan using index_insurer_settings_on_insurer_id on insurer_settings (cost=0.14..0.16 rows=1 width=4) (actual time=0.009..0.010 rows=1 loops=45)

  • Index Cond: (insurer_id = surveys.account_owner_id)
  • Filter: (allow_budget_notification_analyzed_to_workshop IS TRUE)
  • Rows Removed by Filter: 0
Planning time : 4.918 ms
Execution time : 25.960 ms