explain.depesz.com

PostgreSQL's explain analyze made readable

Result: SQJC

Settings
# exclusive inclusive rows x rows loops node
1. 0.323 10.438 ↓ 317.0 317 1

Unique (cost=11,696.59..11,696.62 rows=1 width=159) (actual time=10.072..10.438 rows=317 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. 1.419 10.115 ↓ 1,034.0 1,034 1

Sort (cost=11,696.59..11,696.59 rows=1 width=159) (actual time=10.071..10.115 rows=1,034 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.enddate, lp.created, (CASE WHEN (lp.partner_id = 1,652,472) THEN true ELSE false END)
  • Sort Method: quicksort Memory: 322kB
3. 0.000 8.696 ↓ 1,034.0 1,034 1

Nested Loop (cost=2.44..11,696.58 rows=1 width=159) (actual time=0.046..8.696 rows=1,034 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
  • Inner Unique: true
4. 0.252 6.694 ↓ 1,034.0 1,034 1

Nested Loop (cost=2.15..11,692.20 rows=1 width=81) (actual time=0.041..6.694 rows=1,034 loops=1)

  • 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
5. 0.080 5.174 ↓ 317.0 317 1

Nested Loop (cost=1.58..11,624.33 rows=1 width=89) (actual time=0.037..5.174 rows=317 loops=1)

  • 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, slp.account_id
  • Inner Unique: true
6. 0.177 4.017 ↓ 3.9 359 1

Nested Loop (cost=1.01..11,138.22 rows=92 width=66) (actual time=0.031..4.017 rows=359 loops=1)

  • Output: a.id, a.pricingplan_id, a.name, a.priceoverridetype, a.merchandise_id, a.latestperiod_id, slp.startdate, slp.account_id
  • Inner Unique: true
7. 2.244 2.244 ↓ 2.0 532 1

Index Scan using period_partner_id on public.period slp (cost=0.57..8,930.82 rows=261 width=16) (actual time=0.024..2.244 rows=532 loops=1)

  • 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.partner_id = 1,652,472)
  • Filter: (slp.previousperiod_id IS NULL)
  • Rows Removed by Filter: 3,955
8. 1.596 1.596 ↑ 1.0 1 532

Index Scan using account_pkey on public.account a (cost=0.44..8.46 rows=1 width=50) (actual time=0.003..0.003 rows=1 loops=532)

  • 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 = slp.account_id)
  • Filter: ((a.parent_id IS NULL) AND ((a.status)::text = 'ACTIVE'::text))
  • Rows Removed by Filter: 0
9. 1.077 1.077 ↑ 1.0 1 359

Index Scan using period_pkey on public.period lp (cost=0.57..5.28 rows=1 width=39) (actual time=0.003..0.003 rows=1 loops=359)

  • 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)
  • Filter: (lp.partner_id = 1,652,472)
  • Rows Removed by Filter: 0
10. 1.268 1.268 ↓ 3.0 3 317

Index Scan using period_account_id on public.period p (cost=0.57..67.86 rows=1 width=8) (actual time=0.003..0.004 rows=3 loops=317)

  • 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
  • Index Cond: (p.account_id = a.id)
  • Filter: (p.partner_id = 1,652,472)
  • Rows Removed by Filter: 0
11. 2.068 2.068 ↑ 1.0 1 1,034

Index Scan using merchandise_pkey on public.merchandise m (cost=0.29..4.38 rows=1 width=85) (actual time=0.002..0.002 rows=1 loops=1,034)

  • Output: m.id, m.idforlicensegeneration, m.reviewable, m.multipurchasediscountable, m.licensetype_id, m.productedition_id, m.description, m.licensetype, m.productpackage_id, m.edition_id, m.dbmodified
  • Index Cond: (m.id = a.merchandise_id)
Planning time : 1.421 ms
Execution time : 10.511 ms