explain.depesz.com

PostgreSQL's explain analyze made readable

Result: TcsX

Settings
# exclusive inclusive rows x rows loops node
1. 0.691 44.027 ↑ 1.4 605 1

Unique (cost=59,999.14..60,028.57 rows=841 width=159) (actual time=43.232..44.027 rows=605 loops=1)

  • Output: a.id, a.pricingplan_id, a.name, a.priceoverridetype, a.merchandise_id, m.description, m.licensetype, slp.startdate, lp.license_id, lp.partner_id, lp.enddate, lp.created, (CASE WHEN (lp.partner_id = 1,652,472) THEN true ELSE false END)
2. 3.154 43.336 ↓ 2.8 2,330 1

Sort (cost=59,999.14..60,001.24 rows=841 width=159) (actual time=43.231..43.336 rows=2,330 loops=1)

  • Output: a.id, a.pricingplan_id, a.name, a.priceoverridetype, a.merchandise_id, m.description, m.licensetype, slp.startdate, lp.license_id, lp.partner_id, lp.enddate, lp.created, (CASE WHEN (lp.partner_id = 1,652,472) THEN true ELSE false END)
  • Sort Key: a.id, a.pricingplan_id, a.name, a.priceoverridetype, a.merchandise_id, m.description, m.licensetype, slp.startdate, lp.license_id, lp.partner_id, lp.enddate, lp.created, (CASE WHEN (lp.partner_id = 1,652,472) THEN true ELSE false END)
  • Sort Method: quicksort Memory: 714kB
3. 2.375 40.182 ↓ 2.8 2,330 1

Gather (cost=2,662.43..59,958.28 rows=841 width=159) (actual time=15.577..40.182 rows=2,330 loops=1)

  • Output: a.id, a.pricingplan_id, a.name, a.priceoverridetype, a.merchandise_id, m.description, m.licensetype, slp.startdate, lp.license_id, lp.partner_id, lp.enddate, lp.created, (CASE WHEN (lp.partner_id = 1,652,472) THEN true ELSE false END)
  • Workers Planned: 1
  • Workers Launched: 1
4. 0.520 37.807 ↓ 2.4 1,165 2 / 2

Hash Join (cost=1,662.43..58,873.31 rows=495 width=159) (actual time=14.995..37.807 rows=1,165 loops=2)

  • Output: a.id, a.pricingplan_id, a.name, a.priceoverridetype, a.merchandise_id, m.description, m.licensetype, slp.startdate, lp.license_id, lp.partner_id, lp.enddate, lp.created, CASE WHEN (lp.partner_id = 1,652,472) THEN true ELSE false END
  • Inner Unique: true
  • Hash Cond: (a.merchandise_id = m.id)
  • Worker 0: actual time=14.912..37.078 rows=1,119 loops=1
5. 0.000 23.068 ↓ 2.4 1,165 2 / 2

Nested Loop (cost=68.57..57,276.91 rows=495 width=81) (actual time=0.580..23.068 rows=1,165 loops=2)

  • Output: a.id, a.pricingplan_id, a.name, a.priceoverridetype, a.merchandise_id, lp.license_id, lp.partner_id, lp.enddate, lp.created, slp.startdate
  • Join Filter: (p.account_id = slp.account_id)
  • Worker 0: actual time=0.059..21.901 rows=1,119 loops=1
6. 0.761 10.450 ↓ 2.4 1,165 2 / 2

Nested Loop (cost=68.00..23,711.86 rows=495 width=81) (actual time=0.569..10.450 rows=1,165 loops=2)

  • Output: a.id, a.pricingplan_id, a.name, a.priceoverridetype, a.merchandise_id, p.account_id, lp.license_id, lp.partner_id, lp.enddate, lp.created
  • Inner Unique: true
  • Worker 0: actual time=0.047..9.615 rows=1,119 loops=1
7. 1.153 7.359 ↓ 2.4 1,165 2 / 2

Nested Loop (cost=67.43..21,097.69 rows=495 width=58) (actual time=0.559..7.359 rows=1,165 loops=2)

  • Output: a.id, a.pricingplan_id, a.name, a.priceoverridetype, a.merchandise_id, a.latestperiod_id, p.account_id
  • Inner Unique: true
  • Worker 0: actual time=0.036..6.656 rows=1,119 loops=1
8. 1.304 1.719 ↓ 1.6 2,244 2 / 2

Parallel Bitmap Heap Scan on public.period p (cost=66.99..9,375.27 rows=1,398 width=8) (actual time=0.546..1.719 rows=2,244 loops=2)

  • Output: p.id, p.created, p.startdate, p.enddate, p.months, p.productid, p.current, p.referencenumber, p.invoice_id, p.account_id, p.license_id, p.orderable_id, p.previousperiod_id, p.autoquoted, p.partner_id, p.renewreminded, p.pricingplan_id, p.productfeatureusage_id, p.dbmodified, p.renewalpricingplan_id, p.anchor, p.migrationevaluation_id
  • Recheck Cond: (p.partner_id = 1,652,472)
  • Heap Blocks: exact=1,013
  • Worker 0: actual time=0.024..1.163 rows=2,179 loops=1
9. 0.414 0.414 ↓ 2.0 4,647 1 / 2

Bitmap Index Scan on period_partner_id (cost=0.00..66.40 rows=2,377 width=0) (actual time=0.829..0.829 rows=4,647 loops=1)

  • Index Cond: (p.partner_id = 1,652,472)
10. 4.487 4.487 ↑ 1.0 1 4,487 / 2

Index Scan using account_pkey on public.account a (cost=0.44..8.39 rows=1 width=50) (actual time=0.002..0.002 rows=1 loops=4,487)

  • Output: a.id, a.name, a.autorenew, a.productid, a.domain, a.creditcarddata_id, a.merchandise_id, a.isjplicense, a.currentunits, a.latestperiod_id, a.status, a.unitusdoverridepriceextax, a.priceoverrideenddate, a.dbmodified, a.actualdomain, a.parent_id, a.renewalaction, a.externaluuid, a.pricingplan_id, a.createexternalaccount, a.warnbeforerenewal, a.priceoverridetype, a.archived, a.billing_group_id, a.transaction_account_billing_group_id, a.latestprovisioningoverrideperiod_id
  • Index Cond: (a.id = p.account_id)
  • Filter: ((a.parent_id IS NULL) AND ((a.status)::text = 'ACTIVE'::text))
  • Rows Removed by Filter: 0
  • Worker 0: actual time=0.002..0.002 rows=1 loops=2,179
11. 2.330 2.330 ↑ 1.0 1 2,330 / 2

Index Scan using period_pkey on public.period lp (cost=0.57..5.28 rows=1 width=39) (actual time=0.002..0.002 rows=1 loops=2,330)

  • Output: lp.id, lp.created, lp.startdate, lp.enddate, lp.months, lp.productid, lp.current, lp.referencenumber, lp.invoice_id, lp.account_id, lp.license_id, lp.orderable_id, lp.previousperiod_id, lp.autoquoted, lp.partner_id, lp.renewreminded, lp.pricingplan_id, lp.productfeatureusage_id, lp.dbmodified, lp.renewalpricingplan_id, lp.anchor, lp.migrationevaluation_id
  • Index Cond: (lp.id = a.latestperiod_id)
  • Worker 0: actual time=0.002..0.002 rows=1 loops=1,119
12. 12.815 12.815 ↑ 5.0 1 2,330 / 2

Index Scan using period_account_id on public.period slp (cost=0.57..67.75 rows=5 width=16) (actual time=0.010..0.011 rows=1 loops=2,330)

  • Output: slp.id, slp.created, slp.startdate, slp.enddate, slp.months, slp.productid, slp.current, slp.referencenumber, slp.invoice_id, slp.account_id, slp.license_id, slp.orderable_id, slp.previousperiod_id, slp.autoquoted, slp.partner_id, slp.renewreminded, slp.pricingplan_id, slp.productfeatureusage_id, slp.dbmodified, slp.renewalpricingplan_id, slp.anchor, slp.migrationevaluation_id
  • Index Cond: (slp.account_id = a.id)
  • Filter: (slp.previousperiod_id IS NULL)
  • Rows Removed by Filter: 19
  • Worker 0: actual time=0.010..0.011 rows=1 loops=1,119
13. 8.148 14.219 ↑ 1.0 37,192 2 / 2

Hash (cost=1,128.94..1,128.94 rows=37,194 width=85) (actual time=14.219..14.219 rows=37,192 loops=2)

  • Output: m.description, m.licensetype, m.id
  • Buckets: 65,536 Batches: 1 Memory Usage: 4,861kB
  • Worker 0: actual time=14.516..14.516 rows=37,192 loops=1
14. 6.071 6.071 ↑ 1.0 37,192 2 / 2

Seq Scan on public.merchandise m (cost=0.00..1,128.94 rows=37,194 width=85) (actual time=0.007..6.071 rows=37,192 loops=2)

  • Output: m.description, m.licensetype, m.id
  • Worker 0: actual time=0.009..5.947 rows=37,192 loops=1
Planning time : 1.164 ms
Execution time : 44.275 ms