explain.depesz.com

PostgreSQL's explain analyze made readable

Result: nvaM

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

Sort (cost=2,757,470.94..2,757,470.94 rows=1 width=206) (actual rows= loops=)

  • Sort Key: ev.value, ev.name, f.account_id, (CASE ad_column_identifier(''::character varying, (''::character varying), 'en_US'::character varying) WHEN '**'::text THEN ''::character varying ELSE ad_column_identifier(''::character varying, (''::character varying), 'en_US'::character varying) END)
2. 0.000 0.000 ↓ 0.0

Nested Loop (cost=2,757,454.01..2,757,470.93 rows=1 width=206) (actual rows= loops=)

3. 0.000 0.000 ↓ 0.0

HashAggregate (cost=2,757,453.73..2,757,453.76 rows=2 width=52) (actual rows= loops=)

  • Filter: ((sum(CASE WHEN ((f.dateacct < '2018-10-01 00:00:00'::timestamp without time zone) OR ((f.dateacct = '2018-10-01 00:00:00'::timestamp without time zone) AND ((f.factaccttype)::text = 'O'::text))) THEN (f.amtacctdr - f.amtacctcr) ELSE 0::numeric END) <> 0::numeric) OR (sum(CASE WHEN ((f.dateacct < '2018-11-01 00:00:00'::timestamp without time zone) AND (((f.dateacct >= '2018-10-01 00:00:00'::timestamp without time zone) AND ((f.factaccttype)::text <> ALL ('{O,R,C}'::text[]))) OR ((f.dateacct = '2018-10-01 00:00:00'::timestamp without time zone) AND NULL::boolean))) THEN f.amtacctcr ELSE 0::numeric END) <> 0::numeric) OR (sum(CASE WHEN ((f.dateacct < '2018-11-01 00:00:00'::timestamp without time zone) AND (((f.dateacct >= '2018-10-01 00:00:00'::timestamp without time zone) AND ((f.factaccttype)::text <> ALL ('{O,R,C}'::text[]))) OR ((f.dateacct = '2018-10-01 00:00:00'::timestamp without time zone) AND NULL::boolean))) THEN f.amtacctdr ELSE 0::numeric END) <> 0::numeric))
4. 0.000 0.000 ↓ 0.0

Seq Scan on fact_acct f (cost=0.00..2,733,388.72 rows=291,697 width=52) (actual rows= loops=)

  • Filter: (((ad_client_id)::text = ANY ('{0,E8CB1F6B0B244CA1A8B461979EA1D539}'::text[])) AND ((c_acctschema_id)::text = '0DCC39FCD8DC47159ED82C3F74ECA5CD'::text) AND (isactive = 'Y'::bpchar) AND (((ad_org_id)::text || ''::text) = ANY ('{F4C9677DCC114845A3FF587D466D9E7D,6EAACA1F8ED8495DB8D4C2F872728B92,6683194C80DD411D9BADCA606FA55F88}'::text[])))
5. 0.000 0.000 ↓ 0.0

Index Scan using c_elementvalue_key on c_elementvalue ev (cost=0.29..8.31 rows=1 width=78) (actual rows= loops=)

  • Index Cond: ((c_elementvalue_id)::text = (f.account_id)::text)
  • Filter: (((value)::text <= 'T10002'::text) AND ((elementlevel)::text = 'S'::text))