explain.depesz.com

PostgreSQL's explain analyze made readable

Result: wnZG

Settings
# exclusive inclusive rows x rows loops node
1. 474.922 3,703.476 ↑ 23.1 25,063 1

Gather (cost=745,252.25..859,679.53 rows=580,115 width=24) (actual time=2,434.359..3,703.476 rows=25,063 loops=1)

  • Workers Planned: 2
  • Workers Launched: 2
2. 463.265 3,228.554 ↑ 28.9 8,354 3

Merge Join (cost=744,252.25..800,668.03 rows=241,715 width=24) (actual time=2,360.882..3,228.554 rows=8,354 loops=3)

  • Merge Cond: ((stock_price.company_id = financial_statement.company_id) AND ((date_trunc('day'::text, stock_price.date)) = (date_trunc('day'::text, financial_statement.announced))))
3. 1,753.021 2,742.283 ↑ 1.3 3,263,233 3

Sort (cost=738,313.49..748,521.16 rows=4,083,068 width=24) (actual time=2,339.723..2,742.283 rows=3,263,233 loops=3)

  • Sort Key: stock_price.company_id, (date_trunc('day'::text, stock_price.date))
  • Sort Method: external merge Disk: 164664kB
  • Worker 0: Sort Method: external merge Disk: 156360kB
  • Worker 1: Sort Method: external merge Disk: 158128kB
4. 989.262 989.262 ↑ 1.3 3,266,454 3

Parallel Seq Scan on stock_price (cost=0.00..122,492.68 rows=4,083,068 width=24) (actual time=1.132..989.262 rows=3,266,454 loops=3)

5. 11.234 23.006 ↓ 1.0 25,984 3

Sort (cost=5,938.76..6,003.22 rows=25,784 width=12) (actual time=20.619..23.006 rows=25,984 loops=3)

  • Sort Key: financial_statement.company_id, (date_trunc('day'::text, financial_statement.announced))
  • Sort Method: quicksort Memory: 2783kB
  • Worker 0: Sort Method: quicksort Memory: 2783kB
  • Worker 1: Sort Method: quicksort Memory: 2783kB
6. 10.620 11.772 ↓ 1.0 25,984 3

Bitmap Heap Scan on financial_statement (cost=852.24..4,049.54 rows=25,784 width=12) (actual time=1.210..11.772 rows=25,984 loops=3)

  • Recheck Cond: (quarter_idx = 1)
  • Heap Blocks: exact=638
7. 1.152 1.152 ↓ 1.0 25,984 3

Bitmap Index Scan on financial_statement_quarter_idx (cost=0.00..845.80 rows=25,784 width=0) (actual time=1.152..1.152 rows=25,984 loops=3)

  • Index Cond: (quarter_idx = 1)
Planning time : 0.534 ms
Execution time : 3,725.536 ms