explain.depesz.com

PostgreSQL's explain analyze made readable

Result: LhEN

Settings
# exclusive inclusive rows x rows loops node
1. 4.980 7.405 ↓ 0.0 0 1

Bitmap Heap Scan on activities (cost=140.59..8,029.94 rows=1,788 width=4) (actual time=7.405..7.405 rows=0 loops=1)

  • Recheck Cond: ((type)::text = ANY ('{SendEmailActivity,ReportToCreditorActivity,SendTestEmailActivity}'::text[]))
  • Filter: ((hashed SubPlan 1) OR (hashed SubPlan 2))
  • Rows Removed by Filter: 4549
  • Heap Blocks: exact=2459
2. 2.397 2.397 ↓ 1.9 4,578 1

Bitmap Index Scan on index_activities_on_type (cost=0.00..79.16 rows=2,384 width=0) (actual time=2.397..2.397 rows=4,578 loops=1)

  • Index Cond: ((type)::text = ANY ('{SendEmailActivity,ReportToCreditorActivity,SendTestEmailActivity}'::text[]))
3.          

SubPlan (for Bitmap Heap Scan)

4. 0.022 0.022 ↓ 0.0 0 1

Index Scan using index_activities_on_case_file_id on activities activities_1 (cost=0.42..24.94 rows=11 width=4) (actual time=0.022..0.022 rows=0 loops=1)

  • Index Cond: (case_file_id = 417787)
5. 0.001 0.006 ↓ 0.0 0 1

Nested Loop (cost=11.04..36.00 rows=3 width=4) (actual time=0.006..0.006 rows=0 loops=1)

6. 0.002 0.005 ↓ 0.0 0 1

HashAggregate (cost=10.62..10.65 rows=3 width=8) (actual time=0.005..0.005 rows=0 loops=1)

  • Group Key: merged_records.recordable_id
7. 0.003 0.003 ↓ 0.0 0 1

Index Scan using index_merged_records_on_source_case_file_id on merged_records (cost=0.28..10.61 rows=3 width=8) (actual time=0.003..0.003 rows=0 loops=1)

  • Index Cond: (source_case_file_id = 417787)
  • Filter: ((kind)::text = 'activity'::text)
8. 0.000 0.000 ↓ 0.0 0

Index Only Scan using activities_pkey on activities activities_2 (cost=0.42..8.44 rows=1 width=4) (never executed)

  • Index Cond: (id = merged_records.recordable_id)
  • Heap Fetches: 0
Planning time : 0.474 ms
Execution time : 7.536 ms