explain.depesz.com

PostgreSQL's explain analyze made readable

Result: 9uA3 : Optimization for: plan #2h8m

Settings

Optimization path:

Optimization(s) for this plan:

# exclusive inclusive rows x rows loops node
1. 0.004 31.070 ↑ 1.0 1 1

Limit (cost=84,268.36..84,268.37 rows=1 width=723) (actual time=31.067..31.070 rows=1 loops=1)

2. 4.113 31.066 ↑ 1.0 1 1

Sort (cost=84,268.36..84,268.37 rows=1 width=723) (actual time=31.065..31.066 rows=1 loops=1)

  • Sort Key: created_at DESC
  • Sort Method: top-N heapsort Memory: 25kB
3. 23.632 26.953 ↓ 7,605.0 7,605 1

Bitmap Heap Scan on interactions (cost=664.12..84,268.35 rows=1 width=723) (actual time=5.628..26.953 rows=7,605 loops=1)

  • Recheck Cond: ((security_principal)::text = 'd0cbfc8b5ab02a0bf7b3e91314d0d851'::text)
  • Filter: (((provider_type)::text = 'aswat_call'::text) AND ((provider_agent_id)::text = '111'::text))
  • Rows Removed by Filter: 12556
  • Heap Blocks: exact=14368
4. 3.321 3.321 ↑ 1.2 20,187 1

Bitmap Index Scan on interactions_security_principal_completed_at_discarded_at_idx (cost=0.00..664.12 rows=23,941 width=0) (actual time=3.321..3.321 rows=20,187 loops=1)

  • Index Cond: ((security_principal)::text = 'd0cbfc8b5ab02a0bf7b3e91314d0d851'::text)