explain.depesz.com

A tool for finding a real cause for slow queries.

Result: 1JZ

options
Did it help? Consider supporting us - Bitcoin address: 12v2hUztAk2LgzQ9H9LMwuU32urHMjZQnq
# exclusive inclusive rows x rows loops node
1. 494.483 1,020.110 ↑ 1.8 91,192 1

Sort (cost=28,060.34..28,459.94 rows=159,842 width=185) (actual time=990.718..1,020.110 rows=91,192 loops=1)

  • Sort Key: a.date, a.org_code, a.employee_id, a.calendar_code
  • Sort Method: quicksort Memory: 8460kB
2. 64.744 525.627 ↑ 1.8 91,192 1

Hash Left Join (cost=9,845.69..14,244.96 rows=159,842 width=185) (actual time=355.848..525.627 rows=91,192 loops=1)

  • Hash Cond: ((bg.id = bge.bid_group_id) AND ((a.job_code)::text = (bge.job_code)::text))
3. 78.625 460.870 ↑ 1.8 91,192 1

Merge Right Join (cost=9,844.67..13,045.11 rows=159,842 width=189) (actual time=355.808..460.870 rows=91,192 loops=1)

  • Merge Cond: (("substring"((bg.org_code)::text, 1, 8)) = ("substring"((a.org_code)::text, 1, 8)))
4. 0.013 0.027 ↑ 180.0 2 1

Sort (cost=28.89..29.79 rows=360 width=188) (actual time=0.026..0.027 rows=2 loops=1)

  • Sort Key: ("substring"((bg.org_code)::text, 1, 8))
  • Sort Method: quicksort Memory: 17kB
5. 0.014 0.014 ↑ 180.0 2 1

Seq Scan on bid_group bg (cost=0.00..13.60 rows=360 width=188) (actual time=0.012..0.014 rows=2 loops=1)

6. 280.790 382.218 ↓ 1.0 91,192 1

Sort (cost=9,815.79..10,037.79 rows=88,801 width=39) (actual time=355.773..382.218 rows=91,192 loops=1)

  • Sort Key: ("substring"((a.org_code)::text, 1, 8))
  • Sort Method: quicksort Memory: 13843kB
7. 101.428 101.428 ↓ 1.0 88,807 1

Seq Scan on assignments a (cost=0.00..2,517.11 rows=88,801 width=39) (actual time=0.011..101.428 rows=88,807 loops=1)

  • Filter: ((NOT cancelled_flag) AND ((org_code)::text ~~ '101DF%'::text) AND (fiscal_year = 2013))
8. 0.001 0.013 ↓ 0.0 0 1

Hash (cost=1.00..1.00 rows=1 width=38) (actual time=0.013..0.013 rows=0 loops=1)

9. 0.012 0.012 ↓ 0.0 0 1

Seq Scan on bid_group_entry bge (cost=0.00..1.00 rows=1 width=38) (actual time=0.012..0.012 rows=0 loops=1)