explain.depesz.com

PostgreSQL's explain analyze made readable

Result: 8fVy

Settings
# exclusive inclusive rows x rows loops node
1. 68.212 879.717 ↑ 1.0 1 1

Aggregate (cost=24,644.67..24,644.68 rows=1 width=32) (actual time=879.716..879.717 rows=1 loops=1)

  • Buffers: shared hit=1185508
2. 144.879 811.505 ↓ 101.0 232,510 1

Nested Loop (cost=0.99..24,627.41 rows=2,301 width=9) (actual time=0.033..811.505 rows=232,510 loops=1)

  • Buffers: shared hit=1185508
3. 201.606 201.606 ↓ 42.0 232,510 1

Index Scan using ix_stockitemtransaction_transactiontime_cast on stockitemtransaction sit (cost=0.43..1,247.37 rows=5,538 width=44) (actual time=0.022..201.606 rows=232,510 loops=1)

  • Index Cond: (((transactiontime)::date >= '2020-01-01'::date) AND ((transactiontime)::date <= '2020-01-31'::date))
  • Filter: (storeid = '58b5743f-199f-4377-ae9e-244f3c29a4e0'::uuid)
  • Rows Removed by Filter: 572024
  • Buffers: shared hit=22958
4. 465.020 465.020 ↑ 1.0 1 232,510

Index Scan using dailytotals_storeid_stockitemid_calculationdate_uq on dailytotals dt (cost=0.56..4.22 rows=1 width=41) (actual time=0.002..0.002 rows=1 loops=232,510)

  • Index Cond: ((stockitemid = sit.stockitemid) AND (storeid = '58b5743f-199f-4377-ae9e-244f3c29a4e0'::uuid) AND (calculationdate = (sit.transactiontime)::date))
  • Buffers: shared hit=1162550