explain.depesz.com

PostgreSQL's explain analyze made readable

Result: Eabk

Settings
# exclusive inclusive rows x rows loops node
1. 0.000 2,537.465 ↑ 1.0 1 1

Finalize Aggregate (cost=63,171.78..63,171.80 rows=1 width=32) (actual time=2,537.465..2,537.465 rows=1 loops=1)

  • Buffers: shared hit=4039894
2. 24.472 2,538.966 ↓ 1.5 3 1

Gather (cost=63,171.56..63,171.77 rows=2 width=32) (actual time=2,537.027..2,538.966 rows=3 loops=1)

  • Workers Planned: 2
  • Workers Launched: 2
  • Buffers: shared hit=4039894
3. 238.910 2,514.494 ↑ 1.0 1 3 / 3

Partial Aggregate (cost=62,171.56..62,171.57 rows=1 width=32) (actual time=2,514.494..2,514.494 rows=1 loops=3)

  • Buffers: shared hit=4039894
4. 467.494 2,275.584 ↓ 45.0 268,178 3 / 3

Nested Loop (cost=349.24..62,126.82 rows=5,965 width=9) (actual time=98.471..2,275.584 rows=268,178 loops=3)

  • Buffers: shared hit=4039894
5. 161.857 199.022 ↓ 29.2 268,178 3 / 3

Parallel Bitmap Heap Scan on stockitemtransaction sit (cost=348.68..29,958.64 rows=9,197 width=44) (actual time=98.434..199.022 rows=268,178 loops=3)

  • Recheck Cond: (((transactiontime)::date >= '2020-01-01'::date) AND ((transactiontime)::date <= '2020-01-31'::date) AND (transactiontype = 2))
  • Heap Blocks: exact=5128
  • Buffers: shared hit=17222
6. 37.165 37.165 ↓ 36.4 804,534 1 / 3

Bitmap Index Scan on ix_stockitemtransaction_transactiontime_cast (cost=0.00..343.16 rows=22,073 width=0) (actual time=111.496..111.496 rows=804,534 loops=1)

  • Index Cond: (((transactiontime)::date >= '2020-01-01'::date) AND ((transactiontime)::date <= '2020-01-31'::date))
  • Buffers: shared hit=2201
7. 1,609.068 1,609.068 ↑ 1.0 1 804,534 / 3

Index Scan using dailytotals_storeid_stockitemid_calculationdate_uq on dailytotals dt (cost=0.56..3.50 rows=1 width=41) (actual time=0.006..0.006 rows=1 loops=804,534)

  • Index Cond: ((stockitemid = sit.stockitemid) AND (storeid = sit.storeid) AND (calculationdate = (sit.transactiontime)::date))
  • Buffers: shared hit=4022672