explain.depesz.com

PostgreSQL's explain analyze made readable

Result: lCpp

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

"QUERY PLAN"
"WindowAgg (cost=1606523.60..1606529.10 rows=200 width=176)"
" -> Sort (cost=1606523.60..1606524.10 rows=200 width=232)"
" Sort Key: (GREATEST(sum(abs(CASE WHEN (gl_amount_cr_dr_indicator = 'C'::text) THEN gl_local_amount ELSE 0.00 END)), sum(CASE WHEN (gl_amount_cr_dr_indicator = 'D'::text) THEN gl_local_amount ELSE 0.00 END))) DESC"
" -> WindowAgg (cost=1606511.46..1606515.96 rows=200 width=232)"
" -> Sort (cost=1606511.46..1606511.96 rows=200 width=224)"
" Sort Key: (GREATEST(sum(abs(CASE WHEN (gl_amount_cr_dr_indicator = 'C'::text) THEN gl_reporting_amount ELSE '0'::numeric END)), sum(CASE WHEN (gl_amount_cr_dr_indicator = 'D'::text) THEN gl_reporting_amount ELSE 0.00 END))) DESC"
" -> HashAggregate (cost=1606496.81..1606503.81 rows=200 width=224)"
" Group Key: gl_business_unit_and_journal_id_computed"
" -> Seq Scan on rankby_test (cost=0.00..569,957.13 rows=19,743,613 width=124) (actual rows= loops=)