explain.depesz.com

PostgreSQL's explain analyze made readable

Result: 8dQo

Settings
# exclusive inclusive rows x rows loops node
1. 69.076 1,564.058 ↓ 320.5 641 1

GroupAggregate (cost=954.69..954.85 rows=2 width=57) (actual time=1,493.580..1,564.058 rows=641 loops=1)

  • Group Key: s.branch_name, s.branch_code
2. 152.815 1,494.982 ↓ 30,579.5 61,159 1

Sort (cost=954.69..954.70 rows=2 width=57) (actual time=1,493.387..1,494.982 rows=61,159 loops=1)

  • Sort Key: s.branch_name, s.branch_code
  • Sort Method: quicksort Memory: 10110kB
3. 4.617 1,342.167 ↓ 30,579.5 61,159 1

Subquery Scan on s (cost=954.62..954.68 rows=2 width=57) (actual time=1,294.077..1,342.167 rows=61,159 loops=1)

4. 40.837 1,337.550 ↓ 30,579.5 61,159 1

WindowAgg (cost=954.62..954.66 rows=2 width=86) (actual time=1,294.076..1,337.550 rows=61,159 loops=1)

5. 327.251 1,296.713 ↓ 30,579.5 61,159 1

Sort (cost=954.62..954.63 rows=2 width=86) (actual time=1,294.064..1,296.713 rows=61,159 loops=1)

  • Sort Key: d.branch_code, g.link_guid
  • Sort Method: quicksort Memory: 10145kB
6. 127.118 969.462 ↓ 30,579.5 61,159 1

Nested Loop (cost=23.18..954.61 rows=2 width=86) (actual time=0.091..969.462 rows=61,159 loops=1)

7. 16.295 252.644 ↓ 29,485.0 29,485 1

Nested Loop (cost=0.84..16.89 rows=1 width=70) (actual time=0.039..252.644 rows=29,485 loops=1)

8. 29.954 29.954 ↓ 29,485.0 29,485 1

Index Scan using tm_datebranchtype on transaction_master d (cost=0.56..8.58 rows=1 width=54) (actual time=0.021..29.954 rows=29,485 loops=1)

  • Index Cond: ((sale_date >= '2020-02-04'::date) AND (sale_date <= '2020-02-04'::date))
9. 206.395 206.395 ↑ 1.0 1 29,485

Index Scan using branch_details_pkey on branch_details p (cost=0.28..8.29 rows=1 width=20) (actual time=0.006..0.007 rows=1 loops=29,485)

  • Index Cond: ((branch_code)::text = (d.branch_code)::text)
10. 88.455 589.700 ↑ 114.5 2 29,485

Bitmap Heap Scan on transaction_line_items g (cost=22.34..935.44 rows=229 width=53) (actual time=0.019..0.020 rows=2 loops=29,485)

  • Recheck Cond: ((link_guid)::text = (d.guid)::text)
  • Heap Blocks: exact=60094
11. 501.245 501.245 ↑ 114.5 2 29,485

Bitmap Index Scan on tl_link_guid (cost=0.00..22.28 rows=229 width=0) (actual time=0.017..0.017 rows=2 loops=29,485)

  • Index Cond: ((link_guid)::text = (d.guid)::text)
Planning time : 1.468 ms
Execution time : 1,565.731 ms