explain.depesz.com

PostgreSQL's explain analyze made readable

Result: OGFi

Settings
# exclusive inclusive rows x rows loops node
1. 0.038 521.978 ↑ 1.0 5 1

Subquery Scan on result (cost=1.26..40,371.61 rows=5 width=428) (actual time=226.407..521.978 rows=5 loops=1)

2. 0.018 0.410 ↑ 1.0 5 1

Limit (cost=1.26..7.37 rows=5 width=396) (actual time=0.091..0.410 rows=5 loops=1)

3. 0.049 0.392 ↑ 9,848.6 5 1

Nested Loop (cost=1.26..60,190.42 rows=49,243 width=396) (actual time=0.090..0.392 rows=5 loops=1)

4. 0.022 0.323 ↑ 9,848.6 5 1

Nested Loop Left Join (cost=1.26..58,588.98 rows=49,243 width=195) (actual time=0.073..0.323 rows=5 loops=1)

5. 0.016 0.261 ↑ 9,848.6 5 1

Nested Loop Left Join (cost=0.98..43,377.36 rows=49,243 width=174) (actual time=0.060..0.261 rows=5 loops=1)

6. 0.011 0.220 ↑ 9,848.6 5 1

Nested Loop (cost=0.70..28,949.33 rows=49,243 width=144) (actual time=0.053..0.220 rows=5 loops=1)

  • Join Filter: (ev.c_element_id = e.c_element_id)
7. 0.033 0.199 ↑ 9,848.6 5 1

Nested Loop (cost=0.70..27,717.23 rows=49,243 width=155) (actual time=0.047..0.199 rows=5 loops=1)

8. 0.008 0.106 ↑ 9,848.6 5 1

Nested Loop (cost=0.43..13,289.72 rows=49,243 width=107) (actual time=0.038..0.106 rows=5 loops=1)

9. 0.008 0.008 ↑ 1.0 1 1

Seq Scan on ad_org o (cost=0.00..1.04 rows=1 width=5) (actual time=0.007..0.008 rows=1 loops=1)

  • Filter: (ad_org_id = '5000000'::numeric)
  • Rows Removed by Filter: 1
10. 0.090 0.090 ↑ 9,848.6 5 1

Index Scan using idx_fact_acct_dateacct_funcao on fact_acct f (cost=0.43..12,796.25 rows=49,243 width=126) (actual time=0.029..0.090 rows=5 loops=1)

  • Index Cond: (((dateacct)::date >= '2018-07-06'::date) AND ((dateacct)::date <= '2018-08-10'::date))
  • Filter: ((ad_org_id = '5000000'::numeric) AND (ad_client_id = '5000000'::numeric) AND (c_acctschema_id = '5000000'::numeric) AND (postingtype = 'A'::bpchar))
11. 0.060 0.060 ↑ 1.0 1 5

Index Scan using c_elementvalue_pkey on c_elementvalue ev (cost=0.28..0.29 rows=1 width=48) (actual time=0.012..0.012 rows=1 loops=5)

  • Index Cond: (c_elementvalue_id = f.account_id)
12. 0.008 0.010 ↑ 2.0 1 5

Materialize (cost=0.00..1.03 rows=2 width=13) (actual time=0.002..0.002 rows=1 loops=5)

13. 0.002 0.002 ↑ 2.0 1 1

Seq Scan on c_element e (cost=0.00..1.02 rows=2 width=13) (actual time=0.002..0.002 rows=1 loops=1)

14. 0.025 0.025 ↑ 1.0 1 5

Index Scan using c_elementvalue_pkey on c_elementvalue ev1 (cost=0.28..0.29 rows=1 width=43) (actual time=0.005..0.005 rows=1 loops=5)

  • Index Cond: (f.user1_id = c_elementvalue_id)
15. 0.040 0.040 ↑ 1.0 1 5

Index Scan using c_bpartner_pkey on c_bpartner bp (cost=0.28..0.31 rows=1 width=33) (actual time=0.008..0.008 rows=1 loops=5)

  • Index Cond: (f.c_bpartner_id = c_bpartner_id)
16. 0.009 0.020 ↑ 1.0 1 5

Materialize (cost=0.00..1.05 rows=1 width=24) (actual time=0.002..0.004 rows=1 loops=5)

17. 0.011 0.011 ↑ 1.0 1 1

Seq Scan on ad_orginfo oi (cost=0.00..1.04 rows=1 width=24) (actual time=0.006..0.011 rows=1 loops=1)

  • Filter: ((ad_org_id = '5000000'::numeric) AND ((lbr_cnpj)::text = '11.442.133/0001-34'::text))
  • Rows Removed by Filter: 2
18.          

SubPlan (forSubquery Scan)

19. 214.595 521.530 ↑ 1.0 1 5

Aggregate (cost=8,072.83..8,072.84 rows=1 width=32) (actual time=104.306..104.306 rows=1 loops=5)

20. 192.565 306.935 ↓ 10.5 81,684 5

Bitmap Heap Scan on fact_acct (cost=172.36..8,033.77 rows=7,812 width=8) (actual time=24.931..61.387 rows=81,684 loops=5)

  • Recheck Cond: ((account_id = result.account_id) AND (dateacct < '2018-07-06 00:00:00'::timestamp without time zone) AND (ad_org_id = '5000000'::numeric) AND (c_acctschema_id = '5000000'::numeric))
  • Heap Blocks: exact=61345
21. 114.370 114.370 ↓ 10.5 81,684 5

Bitmap Index Scan on idx_fact_acct_account_dateacct_org_acctschema (cost=0.00..170.41 rows=7,812 width=0) (actual time=22.874..22.874 rows=81,684 loops=5)

  • Index Cond: ((account_id = result.account_id) AND (dateacct < '2018-07-06 00:00:00'::timestamp without time zone) AND (ad_org_id = '5000000'::numeric) AND (c_acctschema_id = '5000000'::numeric))