explain.depesz.com

PostgreSQL's explain analyze made readable

Result: qmEW

Settings
# exclusive inclusive rows x rows loops node
1. 0.084 31,660.037 ↑ 1.0 1,000 1

Limit (cost=300,662.49..300,779.17 rows=1,000 width=601) (actual time=31,524.836..31,660.037 rows=1,000 loops=1)

2. 0.000 31,659.953 ↑ 73.7 1,000 1

Gather Merge (cost=300,662.49..309,262.59 rows=73,710 width=601) (actual time=31,524.834..31,659.953 rows=1,000 loops=1)

  • Workers Planned: 2
  • Workers Launched: 2
3. 308.733 94,540.563 ↑ 99.9 369 3

Sort (cost=299,662.47..299,754.61 rows=36,855 width=601) (actual time=31,513.423..31,513.521 rows=369 loops=3)

  • Sort Key: baa.updated_at
  • Sort Method: top-N heapsort Memory: 1757kB
  • Worker 0: Sort Method: top-N heapsort Memory: 1776kB
  • Worker 1: Sort Method: top-N heapsort Memory: 1755kB
4. 1,498.413 94,231.830 ↓ 1.2 45,094 3

Parallel Hash Join (cost=265,935.12..297,641.75 rows=36,855 width=601) (actual time=31,131.376..31,410.610 rows=45,094 loops=3)

  • Hash Cond: (baa.id = bab.agreement_id)
5. 2,623.509 2,623.509 ↑ 1.2 203,377 3

Parallel Seq Scan on billing_admin_agreement baa (cost=0.00..18,831.23 rows=245,823 width=129) (actual time=2.844..874.503 rows=203,377 loops=3)

6. 957.828 90,109.908 ↓ 1.2 45,094 3

Parallel Hash (cost=263,278.43..263,278.43 rows=36,855 width=464) (actual time=30,036.636..30,036.636 rows=45,094 loops=3)

  • Buckets: 8192 (originally 8192) Batches: 32 (originally 16) Memory Usage: 2336kB
7. 273.433 89,152.080 ↓ 1.2 45,094 3

Nested Loop (cost=0.87..263,278.43 rows=36,855 width=464) (actual time=8.378..29,717.360 rows=45,094 loops=3)

8. 12,714.318 12,714.318 ↓ 1.2 45,094 3

Parallel Index Scan using billing_admin_cycletime_frequency_d731b8f5 on billing_admin_cycletime bac (cost=0.43..35,482.27 rows=36,855 width=76) (actual time=4.409..4,238.106 rows=45,094 loops=3)

  • Index Cond: ((frequency)::text = 'daily'::text)
9. 76,164.329 76,164.329 ↑ 1.0 1 135,283

Index Scan using billing_admin_billablemodel_pkey on billing_admin_billingdefinition bab (cost=0.43..6.18 rows=1 width=388) (actual time=0.563..0.563 rows=1 loops=135,283)

  • Index Cond: (id = bac.billing_definition_id)
Planning time : 78.596 ms
Execution time : 31,660.444 ms