explain.depesz.com

PostgreSQL's explain analyze made readable

Result: sBKu

Settings

Optimization(s) for this plan:

# exclusive inclusive rows x rows loops node
1. 0.000 0.000 ↓ 0.0

Limit (cost=0.00..4,084.94 rows=100 width=208) (actual rows= loops=)

2. 0.000 0.000 ↓ 0.0

Subquery Scan on stgods (cost=0.00..405,307.48 rows=9,922 width=208) (actual rows= loops=)

  • Filter: (NOT (SubPlan 1))
3. 0.000 0.000 ↓ 0.0

Append (cost=0.00..316,070.79 rows=19,845 width=208) (actual rows= loops=)

4. 0.000 0.000 ↓ 0.0

Result (cost=0.00..0.05 rows=3 width=208) (actual rows= loops=)

5. 0.000 0.000 ↓ 0.0

Append (cost=0.00..0.01 rows=3 width=204) (actual rows= loops=)

6. 0.000 0.000 ↓ 0.0

Result (cost=0.00..0.00 rows=0 width=204) (actual rows= loops=)

  • One-Time Filter: false
7. 0.000 0.000 ↓ 0.0

Result (cost=0.00..0.00 rows=0 width=204) (actual rows= loops=)

  • One-Time Filter: false
8. 0.000 0.000 ↓ 0.0

Result (cost=0.00..0.00 rows=0 width=204) (actual rows= loops=)

  • One-Time Filter: false
9. 0.000 0.000 ↓ 0.0

Subquery Scan on *SELECT* 4 (cost=314,780.99..315,971.51 rows=19,842 width=216) (actual rows= loops=)

10. 0.000 0.000 ↓ 0.0

GroupAggregate (cost=314,780.99..315,773.09 rows=19,842 width=329) (actual rows= loops=)

  • Group Key: el.procedure_name, el.table_name, el.hint, el.message, (max(lastok.execution_end_time))
11. 0.000 0.000 ↓ 0.0

Sort (cost=314,780.99..314,830.59 rows=19,842 width=265) (actual rows= loops=)

  • Sort Key: el.procedure_name, el.table_name, el.hint, el.message, (max(lastok.execution_end_time))
12. 0.000 0.000 ↓ 0.0

Hash Right Join (cost=312,915.70..313,364.64 rows=19,842 width=265) (actual rows= loops=)

  • Hash Cond: (el_1.id = el.id)
13. 0.000 0.000 ↓ 0.0

HashAggregate (cost=311,729.26..311,927.68 rows=19,842 width=56) (actual rows= loops=)

  • Group Key: el_1.id
14. 0.000 0.000 ↓ 0.0

Hash Left Join (cost=1,330.08..282,494.41 rows=5,846,970 width=56) (actual rows= loops=)

  • Hash Cond: (el_1.procedure_name = lastok.procedure_name)
  • Join Filter: (lastok.execution_end_time < el_1.execution_end_time)
15. 0.000 0.000 ↓ 0.0

Seq Scan on error_log el_1 (cost=0.00..938.42 rows=19,842 width=56) (actual rows= loops=)

16. 0.000 0.000 ↓ 0.0

Hash (cost=899.48..899.48 rows=34,448 width=35) (actual rows= loops=)

17. 0.000 0.000 ↓ 0.0

Seq Scan on execution_log lastok (cost=0.00..899.48 rows=34,448 width=35) (actual rows= loops=)

18. 0.000 0.000 ↓ 0.0

Hash (cost=938.42..938.42 rows=19,842 width=265) (actual rows= loops=)

19. 0.000 0.000 ↓ 0.0

Seq Scan on error_log el (cost=0.00..938.42 rows=19,842 width=265) (actual rows= loops=)

20.          

SubPlan (for Subquery Scan)

21. 0.000 0.000 ↓ 0.0

Result (cost=0.00..1,071.72 rows=239 width=0) (actual rows= loops=)

  • One-Time Filter: (stgods.status = 'ERROR'::text)
22. 0.000 0.000 ↓ 0.0

Seq Scan on execution_log lhsq (cost=0.00..1,071.72 rows=239 width=0) (actual rows= loops=)

  • Filter: ((execution_end_time > stgods.end_time) AND (procedure_name = stgods.procedure_name))