explain.depesz.com

PostgreSQL's explain analyze made readable

Result: mk2t

Settings
# exclusive inclusive rows x rows loops node
1. 0.185 124.203 ↓ 40.0 80 1

Sort (cost=5,019.01..5,019.01 rows=2 width=206) (actual time=124.189..124.203 rows=80 loops=1)

  • 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)
  • Sort Method: quicksort Memory: 36kB
2. 91.504 124.018 ↓ 40.0 80 1

Nested Loop (cost=4,984.88..5,019.00 rows=2 width=206) (actual time=33.052..124.018 rows=80 loops=1)

3. 20.544 31.714 ↓ 20.0 80 1

HashAggregate (cost=4,984.59..4,984.66 rows=4 width=51) (actual time=31.615..31.714 rows=80 loops=1)

  • Filter: ((sum(CASE WHEN ((f.dateacct < '2018-01-01 00:00:00'::timestamp without time zone) OR ((f.dateacct = '2018-01-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-01-01 00:00:00'::timestamp without time zone) AND ((f.factaccttype)::text <> ALL ('{O,R,C}'::text[]))) OR ((f.dateacct = '2018-01-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-01-01 00:00:00'::timestamp without time zone) AND ((f.factaccttype)::text <> ALL ('{O,R,C}'::text[]))) OR ((f.dateacct = '2018-01-01 00:00:00'::timestamp without time zone) AND NULL::boolean)) THEN f.amtacctdr ELSE 0::numeric END) <> 0::numeric))
4. 8.519 11.170 ↓ 22.8 13,695 1

Bitmap Heap Scan on fact_acct f (cost=1,545.82..4,941.02 rows=601 width=51) (actual time=2.827..11.170 rows=13,695 loops=1)

  • Recheck Cond: (((ad_org_id)::text = ANY ('{DF60E5326C9348768D6735A1A886E1A0,D942ABDA02E742B3ADAA8CE26F025C3C,BCD3C61AD3CC4600A42723D35F536518,BB9E8665FDDC47BB80868249C21AFEE0,A9C29D7A356246E4AB6219B71D052CE1,A0850CFB14B84192AC69D6A2659E732D,9F74C888DAAA4DD6BFA853318C6471CC,9E397CF2F4994083B3F737B1A54C25C9,7FBBA9AAED9B4A7799322D8D871432F8,59286CE7B87A40EA95F18A2FC52C72BC,439CCDC7A9154F819B08992D783C3D27,40150EBEF0844C789E106100B7D3FA52,1FA41EC0D73A460EAA8949793B4167CE,1C495D8300344C89B9DC927CEE617275,1025E6E1F2334EB19BDF25F6694A06B5,0C5FA1C3C5294EA2AD11187C0CBA05CE,042F191270F54DA38002DDC9633E06D0}'::text[])) AND ((ad_org_id)::text = ANY ('{59286CE7B87A40EA95F18A2FC52C72BC,9E397CF2F4994083B3F737B1A54C25C9,439CCDC7A9154F819B08992D783C3D27,C6F8340C82EC4DC5B747B5CAC9319C3D,1FB16D3E817A4CF490E5AC7C23CA283B,1FA41EC0D73A460EAA8949793B4167CE,A0850CFB14B84192AC69D6A2659E732D,BB9E8665FDDC47BB80868249C21AFEE0,40150EBEF0844C789E106100B7D3FA52,440AEC4E4D2E486ABA18AC115388AAC8,DF60E5326C9348768D6735A1A886E1A0,D942ABDA02E742B3ADAA8CE26F025C3C,93D0F1FBB7E646D68F3ACB168C88EC37,BCD3C61AD3CC4600A42723D35F536518,7FBBA9AAED9B4A7799322D8D871432F8,1025E6E1F2334EB19BDF25F6694A06B5,042F191270F54DA38002DDC9633E06D0,C468873E50FA48FE9297DBB4B3A2DD42,0C5FA1C3C5294EA2AD11187C0CBA05CE,91A3772EEDC24834985FF56CB0E19655,0,A9C29D7A356246E4AB6219B71D052CE1,559AF86571ED49C4A4B322D2BF72819C,9F74C888DAAA4DD6BFA853318C6471CC,1C495D8300344C89B9DC927CEE617275}'::text[])) AND ((c_acctschema_id)::text = '074B596A35B24359B4A0BDA4F26B2F8C'::text))
  • Filter: (((ad_client_id)::text = ANY ('{0,E8CB1F6B0B244CA1A8B461979EA1D539}'::text[])) AND (dateacct < '2019-01-01 00:00:00'::timestamp without time zone) AND (isactive = 'Y'::bpchar))
5. 2.651 2.651 ↓ 8.0 13,695 1

Bitmap Index Scan on fact_acct_account (cost=0.00..1,545.67 rows=1,709 width=0) (actual time=2.651..2.651 rows=13,695 loops=1)

  • Index Cond: (((ad_org_id)::text = ANY ('{DF60E5326C9348768D6735A1A886E1A0,D942ABDA02E742B3ADAA8CE26F025C3C,BCD3C61AD3CC4600A42723D35F536518,BB9E8665FDDC47BB80868249C21AFEE0,A9C29D7A356246E4AB6219B71D052CE1,A0850CFB14B84192AC69D6A2659E732D,9F74C888DAAA4DD6BFA853318C6471CC,9E397CF2F4994083B3F737B1A54C25C9,7FBBA9AAED9B4A7799322D8D871432F8,59286CE7B87A40EA95F18A2FC52C72BC,439CCDC7A9154F819B08992D783C3D27,40150EBEF0844C789E106100B7D3FA52,1FA41EC0D73A460EAA8949793B4167CE,1C495D8300344C89B9DC927CEE617275,1025E6E1F2334EB19BDF25F6694A06B5,0C5FA1C3C5294EA2AD11187C0CBA05CE,042F191270F54DA38002DDC9633E06D0}'::text[])) AND ((ad_org_id)::text = ANY ('{59286CE7B87A40EA95F18A2FC52C72BC,9E397CF2F4994083B3F737B1A54C25C9,439CCDC7A9154F819B08992D783C3D27,C6F8340C82EC4DC5B747B5CAC9319C3D,1FB16D3E817A4CF490E5AC7C23CA283B,1FA41EC0D73A460EAA8949793B4167CE,A0850CFB14B84192AC69D6A2659E732D,BB9E8665FDDC47BB80868249C21AFEE0,40150EBEF0844C789E106100B7D3FA52,440AEC4E4D2E486ABA18AC115388AAC8,DF60E5326C9348768D6735A1A886E1A0,D942ABDA02E742B3ADAA8CE26F025C3C,93D0F1FBB7E646D68F3ACB168C88EC37,BCD3C61AD3CC4600A42723D35F536518,7FBBA9AAED9B4A7799322D8D871432F8,1025E6E1F2334EB19BDF25F6694A06B5,042F191270F54DA38002DDC9633E06D0,C468873E50FA48FE9297DBB4B3A2DD42,0C5FA1C3C5294EA2AD11187C0CBA05CE,91A3772EEDC24834985FF56CB0E19655,0,A9C29D7A356246E4AB6219B71D052CE1,559AF86571ED49C4A4B322D2BF72819C,9F74C888DAAA4DD6BFA853318C6471CC,1C495D8300344C89B9DC927CEE617275}'::text[])) AND ((c_acctschema_id)::text = '074B596A35B24359B4A0BDA4F26B2F8C'::text))
6. 0.800 0.800 ↑ 1.0 1 80

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

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