explain.depesz.com

PostgreSQL's explain analyze made readable

Result: EPlQ

Settings
# exclusive inclusive rows x rows loops node
1. 0.033 512.575 ↑ 1.0 1 1

Aggregate (cost=20,140.54..20,140.55 rows=1 width=8) (actual time=512.575..512.575 rows=1 loops=1)

2. 19.083 512.542 ↓ 2.7 43 1

Merge Join (cost=18,782.62..20,140.50 rows=16 width=9) (actual time=448.935..512.542 rows=43 loops=1)

  • Merge Cond: ((h.id)::text = (holdings_entitlements.holding_id)::text)
3. 0.052 0.138 ↓ 1.9 43 1

Sort (cost=92.04..92.10 rows=23 width=46) (actual time=0.132..0.138 rows=43 loops=1)

  • Sort Key: h.id
  • Sort Method: quicksort Memory: 28kB
4. 0.060 0.086 ↓ 1.9 43 1

Bitmap Heap Scan on holdings_temp h (cost=4.60..91.52 rows=23 width=46) (actual time=0.036..0.086 rows=43 loops=1)

  • Recheck Cond: ((contract_id)::text = '38148RL35'::text)
  • Heap Blocks: exact=42
5. 0.026 0.026 ↓ 1.9 43 1

Bitmap Index Scan on index_holdings_contract_id (cost=0.00..4.59 rows=23 width=0) (actual time=0.026..0.026 rows=43 loops=1)

  • Index Cond: ((contract_id)::text = '38148RL35'::text)
6. 13.899 493.321 ↓ 1.4 94,009 1

Unique (cost=18,690.58..19,181.40 rows=69,343 width=37) (actual time=448.175..493.321 rows=94,009 loops=1)

7. 436.988 479.422 ↑ 1.0 94,009 1

Sort (cost=18,690.58..18,935.99 rows=98,163 width=37) (actual time=448.174..479.422 rows=94,009 loops=1)

  • Sort Key: holdings_entitlements.holding_id
  • Sort Method: external merge Disk: 4568kB
8. 42.434 42.434 ↓ 1.0 99,228 1

Seq Scan on holdings_entitlements (cost=0.00..7,866.95 rows=98,163 width=37) (actual time=0.130..42.434 rows=99,228 loops=1)

  • Filter: ((entitlement)::text = 'admin'::text)
  • Rows Removed by Filter: 198688
Planning time : 0.337 ms