explain.depesz.com

PostgreSQL's explain analyze made readable

Result: o52V : gsei_qfatel_datmod05 - 21838 FARIT 2097/FE CENTRO VIDEO SNC DI BERTERO PIETRO & C.

Settings
# exclusive inclusive rows x rows loops node
1. 0.090 24,002.370 ↑ 1,577.8 17 1

Sort (cost=121,099.64..121,166.70 rows=26,823 width=256) (actual time=24,002.369..24,002.370 rows=17 loops=1)

  • Sort Key: ((ba_docume.cprownum)::numeric)
  • Sort Method: quicksort Memory: 27kB
  • btrim(((date_part('year'::text, (ei_datges.dgrifdat)::timestamp without time zone))::character varying(20))::text))) - 3)) || '-'::text) ||
  • substr(('00'::text || btrim(((date_part('month'::text, (ei_datges.dgrifdat)::timestamp without time zone))::character varying(20))::text)),
  • (char_length(('00'::text || btrim(((date_part('month'::text, (ei_datges.dgrifdat)::timestamp without time zone))::character varying(20))::text))) - 1))) || '-'::text) || substr(('00'::text || btrim(((date_part('day'::text, (ei_datges.dgrifdat)::timestamp without time zone))::character varying(20))::text)), (char_length(('00'::text || btrim(((date_part('day'::text, (ei_datges.dgrifdat)::timestamp without time zone))::character varying(20))::text))) - 1)))), ((ba_docume.cprownum)::numeric)
  • || '-'::text) || substr(('00'::text || btrim(((date_part('day'::text, (ei_datges.dgrifdat)::timestamp without time zone))::character varying(20))::text)), (char_length(('00'::text || btrim(((date_part('day'::text, (ei_datges.dgrifdat)::timestamp without time zone))::character varying(20))::text))) - 1)))), ba_docume.cprownum
  • 'xxx'::character varying ELSE ba_docume.dokeyart END)::text) AND ((NOT (SubPlan 1)) OR (COALESCE(char_length(btrim((ba_docume.docoddes)::text)), 0) = 0)))
  • 0 THEN 'xxx'::character varying ELSE ei_sedcescom.cccodipa END)::text = (COALESCE(ei_datges.dgcodipa, CASE COALESCE(char_length(btrim((ei_sedcescom.cccodipa)::text)), 0) WHEN 0 THEN 'xxx'::character varying ELSE ei_sedcescom.cccodipa END))::text) AND ((CASE COALESCE(char_length(btrim((ei_sedcescom.cccodest)::text)), 0) WHEN 0 THEN CASE COALESCE(char_length(btrim((ei_cescom.cccodest)::text)), 0) WHEN 0 THEN 'xxx'::character varying ELSE ei_cescom.cccodest END ELSE ei_sedcescom.cccodest END)::text = (CASE COALESCE(char_length(btrim((ei_datges.dgcodest)::text)), 0) WHEN 0 THEN CASE COALESCE(char_length(btrim((ei_sedcescom.cccodest)::text)), 0) WHEN 0 THEN CASE COALESCE(char_length(btrim((ei_cescom.cccodest)::text)), 0) WHEN 0 THEN 'xxx'::character varying ELSE ei_cescom.cccodest END ELSE ei_sedcescom.cccodest END ELSE ei_datges.dgcodest END)::text) AND ((CASE COALESCE(char_length(btrim((ei_sedcescom.ccpec)::text)), 0) WHEN 0 THEN CASE COALESCE(char_length(btrim((ei_cescom.ccpec)::text)), 0) WHEN 0 THEN 'xxx'::character varying ELSE ei_cescom.ccpec END ELSE ei_sedcescom.ccpec END)::text = (CASE COALESCE(char_length(btrim((ei_datges.dgpec)::text)), 0) WHEN 0 THEN CASE COALESCE(char_length(btrim((ei_sedcescom.ccpec)::text)), 0) WHEN 0 THEN CASECOALESCE(char_length(btrim((ei_cescom.ccpec)::text)), 0) WHEN 0 THEN 'xxx'::character varying ELSE ei_cescom.ccpec END ELSE ei_sedcescom.ccpec END ELSE ei_datges.dgpec END)::text))
  • 0 THEN 'xxx'::character varying ELSE ba_docume_m.docodcau END)::text) AND ((CASE ei_datges.dgtipsed WHEN 0 THEN CASE COALESCE(char_length(btrim((ba_docume_m.dodipsog)::text)), 0) WHEN 0 THEN 'xxx'::character varying ELSE ba_docume_m.dodipsog END ELSE CASE COALESCE(char_length(btrim((ba_docume_m.dodipcon)::text)), 0) WHEN 0 THEN 'xxx'::character varying ELSE ba_docume_m.dodipcon END END)::text = (COALESCE(ei_datges.dgdipsog, CASE ei_datges.dgtipsed WHEN 0 THEN CASE COALESCE(char_length(btrim((ba_docume_m.dodipsog)::text)), 0) WHEN 0 THEN 'xxx'::character
  • varying ELSE ba_docume_m.dodipsog END ELSE CASE COALESCE(char_length(btrim((ba_docume_m.dodipcon)::text)), 0) WHEN 0 THEN 'xxx'::charactervarying ELSE ba_docume_m.dodipcon END END))::text))
  • > 0) THEN ei_datges_1.dgflgart ELSE CASE COALESCE(ba_docume_1.doflgart, 0) WHEN 0 THEN 0 ELSE ba_docume_1.doflgart END END = CASE COALESCE(ba_docume_1.doflgart, 0) WHEN 0 THEN 0 ELSE ba_docume_1.doflgart END) AND ((COALESCE(ei_datges_1.dgkeyart, CASE COALESCE(char_length(btrim((ba_docume_1.dokeyart)::text)), 0) WHEN 0 THEN 'xxx'::character varying ELSE ba_docume_1.dokeyart END))::text = (CASE COALESCE(char_length(btrim((ba_docume_1.dokeyart)::text)), 0) WHEN 0 THEN 'xxx'::character varying ELSE ba_docume_1.dokeyart END)::text) AND ((NOT (SubPlan 2)) OR(COALESCE(char_length(btrim((ba_docume_1.docoddes)::text)), 0) = 0)))
  • ELSE ba_docume_m_1.dodipsog END ELSE CASE COALESCE(char_length(btrim((ba_docume_m_1.dodipcon)::text)), 0) WHEN 0 THEN 'xxx'::character varying ELSE ba_docume_m_1.dodipcon END END)::text = (COALESCE(ei_datges_1.dgdipsog, CASE ei_datges_1.dgtipsed WHEN 0 THEN CASE COALESCE(char_length(btrim((ba_docume_m_1.dodipsog)::text)), 0) WHEN 0 THEN 'xxx'::character varying ELSE ba_docume_m_1.dodipsog END ELSE CASE COALESCE(char_length(btrim((ba_docume_m_1.dodipcon)::text)), 0) WHEN 0 THEN 'xxx'::character varying ELSE ba_docume_m_1.dodipcon END END))::text))
  • = 'ihhhyeahqq'::text)
  • loops=1)
  • (actual time=0.013..0.013 rows=0 loops=1)
2. 0.190 24,002.273 ↑ 1,577.8 17 1

Hash Join (cost=106,236.02..119,126.65 rows=26,823 width=256) (actual time=13,725.271..24,002.273 rows=17 loops=1)

  • Hash Cond: (((ba_docume.cprownum)::numeric) = (ei_fattele.cprownum)::numeric)
3. 2,721.833 24,002.083 ↑ 18,562.4 17 1

Unique (cost=106,215.30..113,315.40 rows=315,560 width=256) (actual time=13,725.122..24,002.083 rows=17 loops=1)

4. 13,947.109 21,280.250 ↓ 16.0 5,048,893 1

Sort (cost=106,215.30..107,004.20 rows=315,560 width=256) (actual time=13,725.120..21,280.250 rows=5,048,893 loops=1)

  • Sort Key: (((ba_docume.doserial)::text || btrim(substr(('000000'::text || btrim(((ba_docume.cproword)::character varying(20))::text)), (char_length(('000000'::text || btrim(((ba_docume.cproword)::character varying(20))::text))) - 5))))), ((ei_datges.cprownum)::numeric), ((ei_datges.cproword)::numeric), ei_datges.dgtipdat, ei_datges.dgriftes, ei_datges.dgrifnum, (((((substr(('0000'::text || btrim(((date_part('year'::text, (ei_datges.dgrifdat)::timestamp without time zone))::character varying(20))::text)), (char_length(('0000'::text ||
  • Sort Method: external merge Disk: 535,072kB
5. 7,333.014 7,333.141 ↓ 16.0 5,048,893 1

Append (cost=210.44..55,281.45 rows=315,560 width=256) (actual time=0.205..7,333.141 rows=5,048,893 loops=1)

6. 0.001 0.127 ↓ 0.0 0 1

HashAggregate (cost=210.44..210.49 rows=3 width=256) (actual time=0.127..0.127 rows=0 loops=1)

  • Group Key: (((ba_docume.doserial)::text || btrim(substr(('000000'::text || btrim(((ba_docume.cproword)::character varying(20))::text)), (char_length(('000000'::text || btrim(((ba_docume.cproword)::character varying(20))::text))) - 5))))), ei_datges.cprownum, ei_datges.cproword, ei_datges.dgtipdat, ei_datges.dgriftes, ei_datges.dgrifnum, (((((substr(('0000'::text || btrim(((date_part('year'::text, (ei_datges.dgrifdat)::timestamp without time zone))::character varying(20))::text)), (char_length(('0000'::text || btrim(((date_part('year'::text, (ei_datges.dgrifdat)::timestamp without time zone))::character varying(20))::text))) - 3)) || '-'::text) || substr(('00'::text || btrim(((date_part('month'::text, (ei_datges.dgrifdat)::timestamp without time zone))::character varying(20))::text)), (char_length(('00'::text || btrim(((date_part('month'::text, (ei_datges.dgrifdat)::timestamp without time zone))::character varying(20))::text))) - 1)))
7. 0.027 0.126 ↓ 0.0 0 1

Append (cost=99.00..210.38 rows=3 width=172) (actual time=0.126..0.126 rows=0 loops=1)

8. 0.000 0.099 ↓ 0.0 0 1

Nested Loop Left Join (cost=99.00..194.26 rows=1 width=88) (actual time=0.099..0.099 rows=0 loops=1)

  • Join Filter: ((gsei_qfatel_datges02.dgidguid)::text = (ei_datges.dgidguid)::text)
9. 0.001 0.099 ↓ 0.0 0 1

Nested Loop (cost=1.96..97.00 rows=1 width=54) (actual time=0.098..0.099 rows=0 loops=1)

  • Join Filter: ((CASE WHEN (COALESCE(ei_datges.dgflgart, 0) > 0) THEN ei_datges.dgflgart ELSE CASE COALESCE(ba_docume.doflgart, 0) WHEN 0 THEN 0 ELSE ba_docume.doflgart END END = CASE COALESCE(ba_docume.doflgart, 0) WHEN 0 THEN 0 ELSE ba_docume.doflgart END) AND ((COALESCE(ei_datges.dgkeyart, CASE COALESCE(char_length(btrim((ba_docume.dokeyart)::text)), 0) WHEN 0 THEN'xxx'::character varying ELSE ba_docume.dokeyart END))::text = (CASE COALESCE(char_length(btrim((ba_docume.dokeyart)::text)), 0) WHEN 0 THEN
10. 0.000 0.098 ↓ 0.0 0 1

Nested Loop Left Join (cost=1.53..12.88 rows=1 width=94) (actual time=0.098..0.098 rows=0 loops=1)

  • Filter: (((CASE COALESCE(char_length(btrim((ei_sedcescom.cccodipa)::text)), 0) WHEN
11. 0.000 0.098 ↓ 0.0 0 1

Nested Loop Left Join (cost=0.99..9.98 rows=1 width=158) (actual time=0.098..0.098 rows=0 loops=1)

12. 0.000 0.098 ↓ 0.0 0 1

Nested Loop Left Join (cost=0.70..9.66 rows=1 width=153) (actual time=0.098..0.098 rows=0 loops=1)

13. 0.032 0.098 ↓ 0.0 0 1

Nested Loop (cost=0.42..7.16 rows=1 width=143) (actual time=0.098..0.098 rows=0 loops=1)

  • Join Filter: (((COALESCE(ei_datges.dgtipsog, CASE COALESCE(char_length(btrim((ba_docume_m.dotipfat)::text)), 0) WHEN 0 THEN 'xxx'::character varying ELSE ba_docume_m.dotipfat END))::text = (CASE COALESCE(char_length(btrim((ba_docume_m.dotipfat)::text)), 0) WHEN 0 THEN 'xxx'::character varying ELSE ba_docume_m.dotipfat END)::text) AND ((COALESCE(ei_datges.dgcodsog, CASE COALESCE(char_length(btrim((ba_docume_m.dosogfat)::text)), 0) WHEN 0 THEN 'xxx'::character varying ELSE ba_docume_m.dosogfat END))::text = (CASE COALESCE(char_length(btrim((ba_docume_m.dosogfat)::text)), 0) WHEN 0 THEN 'xxx'::character varying ELSE ba_docume_m.dosogfat END)::text) AND ((COALESCE(ei_datges.dgcodcau, CASE COALESCE(char_length(btrim((ba_docume_m.docodcau)::text)), 0) WHEN 0 THEN 'xxx'::character varying ELSE ba_docume_m.docodcau END))::text = (CASE COALESCE(char_length(btrim((ba_docume_m.docodcau)::text)), 0) WHEN
  • Rows Removed by Join Filter: 32
14. 0.048 0.048 ↑ 1.0 1 1

Index Scan using pk_ba_docume_m001 on ba_docume_m001 ba_docume_m (cost=0.42..2.64 rows=1 width=56) (actual time=0.048..0.048 rows=1 loops=1)

  • Index Cond: ((doserial)::text = 'ihhhyeahqq'::text)
15. 0.018 0.018 ↓ 0.0 32 1

Seq Scan on ei_datges001 ei_datges (cost=0.00..1.32 rows=32width=174) (cost=0..0 rows=0 width=0) (actual time=0.016..0.018 rows=32 loops=1)

16. 0.000 0.000 ↓ 0.0 0

Index Only Scan using pk_ba_keysog001 on ba_keysog001 ba_keysog (cost=0.28..2.50 rows=1 width=10) (never executed)

  • Index Cond: ((kstipsog = (ba_docume_m.dotipfat)::text) AND (kscodsog = (ba_docume_m.dosogfat)::text))
  • Heap Fetches: 0
17. 0.000 0.000 ↓ 0.0 0

Index Scan using pk_ei_cescom001 on ei_cescom001 ei_cescom (cost=0.28..0.31 rows=1 width=25) (never executed)

  • Index Cond: (((cctipsog)::text = (ba_keysog.kstipsog)::text) AND ((cccodsog)::text = (ba_keysog.kscodsog)::text))
18. 0.000 0.000 ↓ 0.0 0

Nested Loop Left Join (cost=0.54..2.80 rows=1 width=29) (never executed)

  • -> Index Only Scan using pk_ba_cliforsed001 on ba_cliforsed001 ba_cliforsed
19. 0.000 0.000 ↓ 0.0 0

(cost=0.41..2.64 rows=1 width=35) (cost=0..0 rows=0 width=0) (never executed)

  • Index Cond: ((dptipsog = (ba_docume_m.dotipfat)::text) AND (dpcodsog =(ba_docume_m.dosogfat)::text) AND (dpcodsed = (ba_docume_m.dodipfat)::text))
  • Heap Fetches: 0
  • -> Index Scan using pk_ba_docume001 on ba_docume001 ba_docume (cost=0.43..52.15 rows=37
20. 0.000 0.000 ↓ 0.0 0

Index Scan using pk_ei_sedcescom001 on ei_sedcescom001 ei_sedcescom (cost=0.13..0.16 rows=1 width=48) (never executed)

  • Index Cond: (((cctipsog)::text = (ba_cliforsed.dptipsog)::text) AND ((cccodsog)::text = (ba_cliforsed.dpcodsog)::text) AND ((cccodcom)::text = (ba_cliforsed.dpcodcom)::text) AND ((cccodsed)::text = (ba_cliforsed.dpcodsed)::text))
21. 0.000 0.000 ↓ 0.0 0

width=39) (cost=0..0 rows=0 width=0) (never executed)

  • Index Cond: ((doserial)::text = 'ihhhyeahqq'::text)
  • Filter: ((doflripa <> 1) AND (doflgart = ANY ('{1,4,5,7}'::integer[])))
22. 0.000 0.000 ↓ 0.0 0

Subquery Scan on gsei_qfatel_datges02 (cost=97.04..97.07 rows=1 width=11) (never executed)

  • Filter: (gsei_qfatel_datges02.roworder = 1)
23. 0.000 0.000 ↓ 0.0 0

WindowAgg (cost=97.04..97.06 rows=1 width=27) (never executed)

24. 0.000 0.000 ↓ 0.0 0

Sort (cost=97.04..97.04 rows=1 width=19) (never executed)

  • Sort Key: ba_docume_1.cprownum, (max(ei_datges_1.dgpriori))
25. 0.000 0.000 ↓ 0.0 0

GroupAggregate (cost=97.01..97.03 rows=1 width=19) (never executed)

  • Group Key: ei_datges_1.dgidguid, ba_docume_1.cprownum
26. 0.000 0.000 ↓ 0.0 0

Sort (cost=97.01..97.01 rows=1 width=19) (never executed)

  • Sort Key: ei_datges_1.dgidguid, ba_docume_1.cprownum
27. 0.000 0.000 ↓ 0.0 0

Nested Loop (cost=1.96..97.00 rows=1 width=19) (never executed)

  • Join Filter: ((CASE WHEN (COALESCE(ei_datges_1.dgflgart, 0)
28. 0.000 0.000 ↓ 0.0 0

Nested Loop Left Join (cost=1.53..12.88 rows=1 width=74) (never executed)

  • Filter: (((CASE COALESCE(char_length(btrim((ei_sedcescom_1.cccodipa)::text)), 0) WHEN 0 THEN 'xxx'::character varying ELSE ei_sedcescom_1.cccodipa END)::text = (COALESCE(ei_datges_1.dgcodipa, CASE COALESCE(char_length(btrim((ei_sedcescom_1.cccodipa)::text)), 0) WHEN 0 THEN 'xxx'::character varying ELSE ei_sedcescom_1.cccodipa END))::text) AND ((CASE COALESCE(char_length(btrim((ei_sedcescom_1.cccodest)::text)), 0) WHEN 0 THEN CASE COALESCE(char_length(btrim((ei_cescom_1.cccodest)::text)), 0) WHEN 0 THEN 'xxx'::character varying ELSE ei_cescom_1.cccodest END ELSE ei_sedcescom_1.cccodest END)::text = (CASE COALESCE(char_length(btrim((ei_datges_1.dgcodest)::text)), 0) WHEN 0 THEN CASE COALESCE(char_length(btrim((ei_sedcescom_1.cccodest)::text)), 0) WHEN 0 THEN CASE COALESCE(char_length(btrim((ei_cescom_1.cccodest)::text)), 0) WHEN 0 THEN 'xxx'::character varying ELSE ei_cescom_1.cccodest END ELSE ei_sedcescom_1.cccodest END ELSE ei_datges_1.dgcodest END)::text) AND ((CASE COALESCE(char_length(btrim((ei_sedcescom_1.ccpec)::text)), 0) WHEN 0 THEN CASE COALESCE(char_length(btrim((ei_cescom_1.ccpec)::text)), 0) WHEN 0 THEN 'xxx'::character varying ELSE ei_cescom_1.ccpec END ELSE ei_sedcescom_1.ccpec END)::text = (CASE COALESCE(char_length(btrim((ei_datges_1.dgpec)::text)), 0) WHEN 0 THEN CASE COALESCE(char_length(btrim((ei_sedcescom_1.ccpec)::text)), 0) WHEN 0 THEN CASE COALESCE(char_length(btrim((ei_cescom_1.ccpec)::text)), 0) WHEN 0 THEN 'xxx'::character varying ELSE ei_cescom_1.ccpec END ELSE ei_sedcescom_1.ccpec END ELSE ei_datges_1.dgpec END)::text))
29. 0.000 0.000 ↓ 0.0 0

Nested Loop Left Join (cost=0.99..9.98 rows=1 width=138) (never executed)

30. 0.000 0.000 ↓ 0.0 0

Nested Loop Left Join (cost=0.70..9.66 rows=1 width=133) (never executed)

  • -> Index Only Scan using pk_ba_keysog001
31. 0.000 0.000 ↓ 0.0 0

Nested Loop (cost=0.42..7.16 rows=1width=123) (cost=0..0 rows=0 width=0) (never executed)

  • Join Filter: (((COALESCE(ei_datges_1.dgtipsog, CASE COALESCE(char_length(btrim((ba_docume_m_1.dotipfat)::text)), 0) WHEN 0 THEN 'xxx'::character varying ELSE ba_docume_m_1.dotipfat END))::text = (CASE COALESCE(char_length(btrim((ba_docume_m_1.dotipfat)::text)), 0) WHEN 0 THEN 'xxx'::character varying ELSE ba_docume_m_1.dotipfat END)::text) AND ((COALESCE(ei_datges_1.dgcodsog, CASE COALESCE(char_length(btrim((ba_docume_m_1.dosogfat)::text)), 0) WHEN 0THEN 'xxx'::character varying ELSE ba_docume_m_1.dosogfat END))::text = (CASE COALESCE(char_length(btrim((ba_docume_m_1.dosogfat)::text)), 0) WHEN 0 THEN 'xxx'::character varying ELSE ba_docume_m_1.dosogfat END)::text) AND ((COALESCE(ei_datges_1.dgcodcau, CASE COALESCE(char_length(btrim((ba_docume_m_1.docodcau)::text)), 0) WHEN 0 THEN 'xxx'::character varying ELSE ba_docume_m_1.docodcau END))::text = (CASE COALESCE(char_length(btrim((ba_docume_m_1.docodcau)::text)), 0) WHEN 0 THEN 'xxx'::character varying ELSE ba_docume_m_1.docodcau END)::text) AND ((CASE ei_datges_1.dgtipsed WHEN 0 THEN CASE COALESCE(char_length(btrim((ba_docume_m_1.dodipsog)::text)), 0) WHEN 0 THEN 'xxx'::character varying
32. 0.000 0.000 ↓ 0.0 0

Index Scan using pk_ba_docume_m001 on ba_docume_m001 ba_docume_m_1 (cost=0.42..2.64 rows=1 width=56) (never executed)

  • Index Cond: ((doserial)::text
33. 0.000 0.000 ↓ 0.0 0

Seq Scan on ei_datges001 ei_datges_1 (cost=0.00..1.32 rows=32 width=154) (never executed)

34.          

SubPlan (for width=39))

35. 0.000 0.000 ↓ 0.0 0

Seq Scan on ei_desnoxml_001 ei_desnoxml (cost=0.00..1.62 rows=3 width=5) (never executed)

  • Filter: ((dncodcau)::text = (ba_docume_m.docodcau)::text)
36. 0.000 0.000 ↓ 0.0 0

on ba_keysog001 ba_keysog_1 (cost=0.28..2.50 rows=1 width=10) (never executed)

  • Index Cond: ((kstipsog = (ba_docume_m_1.dotipfat)::text) AND (kscodsog = (ba_docume_m_1.dosogfat)::text))
  • Heap Fetches: 0
37. 0.000 0.000 ↓ 0.0 0

Index Scan using pk_ei_cescom001 on ei_cescom001 ei_cescom_1 (cost=0.28..0.31 rows=1 width=25) (never executed)

  • Index Cond: (((cctipsog)::text = (ba_keysog_1.kstipsog)::text) AND ((cccodsog)::text = (ba_keysog_1.kscodsog)::text))
38. 0.000 0.000 ↓ 0.0 0

Nested Loop Left Join (cost=0.54..2.80 rows=1 width=29) (never executed)

  • -> Index Only Scan using pk_ba_cliforsed001 on
39. 0.000 0.000 ↓ 0.0 0

ba_cliforsed001 ba_cliforsed_1 (cost=0.41..2.64 rows=1 width=35) (never executed)

  • Index Cond: ((dptipsog = (ba_docume_m_1.dotipfat)::text) AND (dpcodsog = (ba_docume_m_1.dosogfat)::text) AND (dpcodsed = (ba_docume_m_1.dodipfat)::text))
  • Heap Fetches: 0
40. 0.000 0.000 ↓ 0.0 0

Index Scan using pk_ei_sedcescom001 on ei_sedcescom001 ei_sedcescom_1 (cost=0.13..0.16 rows=1 width=48) (never executed)

  • Index Cond: (((cctipsog)::text = (ba_cliforsed_1.dptipsog)::text) AND ((cccodsog)::text = (ba_cliforsed_1.dpcodsog)::text) AND ((cccodcom)::text = (ba_cliforsed_1.dpcodcom)::text) AND ((cccodsed)::text = (ba_cliforsed_1.dpcodsed)::text))
41. 0.000 0.000 ↓ 0.0 0

Index Scan using pk_ba_docume001 on ba_docume001 ba_docume_1 (cost=0.43..52.15 rows=37 width=35) (never executed)

  • Index Cond: ((doserial)::text = 'ihhhyeahqq'::text)
  • Filter: ((doflripa <> 1) AND (doflgart = ANY ('{1,4,5,7}'::integer[])))
42. 0.001 0.002 ↓ 0.0 0 1

Subquery Scan on *SELECT* 2 (cost=0.00..0.07 rows=1 width=172) (actual time=0.002..0.002 rows=0 loops=1)

43. 0.000 0.001 ↓ 0.0 0 1

Subquery Scan on gsei_qfatel_datges_b01 (cost=0.00..0.05 rows=1 width=144) (actual time=0.001..0.001 rows=0 loops=1)

44. 0.001 0.001 ↓ 0.0 0 1

HashAggregate (cost=0.00..0.01 rows=1 width=59) (actual time=0.001..0.001 rows=0 loops=1)

  • Group Key: doserial, cprownum
45. 0.000 0.000 ↓ 0.0 0 1

Result (cost=0.00..0.00 rows=0 width=87) (actual time=0.000..0.000 rows=0 loops=1)

  • One-Time Filter: false
46. 0.001 0.025 ↓ 0.0 0 1

Subquery Scan on *SELECT* 3 (cost=0.55..16.02 rows=1 width=145) (actual time=0.025..0.025 rows=0 loops=1)

  • -> Nested Loop Left Join (cost=0.55..16.01 rows=1 width=145) (actual time=0.025..0.025 rows=0
47. 0.007 0.024 ↓ 0.0 0 1

Nested Loop (cost=0.42..15.26 rows=1 width=36) (actual time=0.024..0.024 rows=0 loops=1)

  • Join Filter: ((ba_docume_m_2.dorifent)::text = (ba_dicint.diserial)::text)
  • Rows Removed by Join Filter: 10
  • -> Seq Scan on ba_dicint001 ba_dicint (cost=0.00..1.10 rows=10 width=25) (actualtime=0.005..0.005 rows=10 loops=1)
48. 0.002 0.017 ↑ 1.0 1 1

Nested Loop Left Join (cost=0.42..14.04 rows=1 width=22) (actual time=0.017..0.017 rows=1 loops=1)

  • Join Filter: ((ba_docume_m_2.doserial)::text = (ei_tmpdicint.diserial)::text)
  • Filter: (COALESCE(char_length(btrim((ei_tmpdicint.diserial)::text)), 0) = 0)
49. 0.013 0.013 ↑ 1.0 1 1

Index Scan using pk_ba_docume_m001 on ba_docume_m001 ba_docume_m_2 (cost=0.42..2.64 rows=1 width=22) (actual time=0.013..0.013 rows=1 loops=1)

  • Index Cond: ((doserial)::text = 'ihhhyeahqq'::text)
50. 0.002 0.002 ↓ 0.0 0 1

Seq Scan on cptmp_uyhxvqubdz ei_tmpdicint (cost=0.00..11.38 rows=1 width=38) (actual time=0.002..0.002 rows=0 loops=1)

  • Filter: ((diserial)::text = 'ihhhyeahqq'::text)
51. 0.000 0.000 ↓ 0.0 0

Index Scan using pk_ei_dicint001 on ei_dicint001 ei_dicint (cost=0.13..0.48 rows=1 width=16) (never executed)

  • Index Cond: ((diserial)::text = (ba_dicint.diserial)::text)
52. 1,052.638 6,947.232 ↓ 16.0 5,048,880 1

Subquery Scan on *SELECT* 4 (cost=0.29..53,284.72 rows=315,540 width=692) (actual time=0.076..6,947.232 rows=5,048,880 loops=1)

53. 4,703.886 5,894.594 ↓ 16.0 5,048,880 1

Nested Loop (cost=0.29..49,340.47 rows=315,540 width=664) (actual time=0.075..5,894.594 rows=5,048,880 loops=1)

54. 0.126 0.196 ↓ 16.0 16 1

Nested Loop (cost=0.29..14.92 rows=1 width=548) (actual time=0.049..0.196 rows=16 loops=1)

  • -> Seq Scan on cptmp_nahgrwxrso tmp_ei_ivarowdoc (cost=0.00..12.40 rows=1 width=548) (actualtime=0.007..0.023 rows=4 loops=4)
55. 0.070 0.070 ↓ 4.0 4 1

Index Scan using pk_ei_datrie001 on ei_datrie001 ei_datrie (cost=0.29..2.51 rows=1 width=0) (actual time=0.038..0.070 rows=4 loops=1)

  • Index Cond: ((idserial)::text = 'ihhhyeahqq'::text)
  • Filter: (idflgxml = 1)
  • Filter: (((ividelab)::text = 'ngnejbzowe'::text) AND (COALESCE(char_length(btrim((ivdeciva)::text)), 0) > 0))
  • Rows Removed by Filter: 4
56. 1,190.512 1,190.512 ↓ 1.0 315,555 16

Seq Scan on ba_docume_m001 ba_docume_m_3 (cost=0.00..34,337.40 rows=315,540 width=0) (actual time=0.003..74.407 rows=315,555 loops=16)

57. 0.003 0.037 ↓ 3.0 3 1

Subquery Scan on *SELECT* 5 (cost=0.00..13.38 rows=1 width=240) (actual time=0.032..0.037 rows=3 loops=1)

58. 0.034 0.034 ↓ 3.0 3 1

Seq Scan on cptmp_epljsdkljl tmp_ei_inforowdoc (cost=0.00..13.36 rows=1 width=156) (actual time=0.029..0.034 rows=3 loops=1)

  • Filter: (((irdocserial)::text = 'ihhhyeahqq'::text) AND ((iridelab)::text = 'ngnejbzowe'::text) AND (((irtipe)::text = 'SPR'::text) OR (((irtipe)::text = 'AC'::text) AND (COALESCE(char_length(btrim((irassdes)::text)), 0) > 0))))
  • Rows Removed by Filter: 3
59. 0.000 0.008 ↓ 0.0 0 1

Subquery Scan on *SELECT* 6 (cost=0.00..12.19 rows=1 width=240) (actual time=0.008..0.008 rows=0 loops=1)

60. 0.008 0.008 ↓ 0.0 0 1

Seq Scan on cptmp_epljsdkljl tmp_ei_inforowdoc_1 (cost=0.00..12.17 rows=1 width=156) (actual time=0.008..0.008 rows=0 loops=1)

  • Filter: (((irdocserial)::text = 'ihhhyeahqq'::text) AND ((iridelab)::text = 'ngnejbzowe'::text) AND ((irtipe)::text = 'SPR'::text))
  • Rows Removed by Filter: 6
61. 0.003 0.106 ↑ 1.0 1 1

Subquery Scan on *SELECT* 7 (cost=2.79..4.35 rows=1 width=256) (actual time=0.102..0.106 rows=1 loops=1)

62. 0.008 0.103 ↑ 1.0 1 1

Nested Loop (cost=2.79..4.33 rows=1 width=144) (actual time=0.099..0.103 rows=1 loops=1)

63. 0.020 0.082 ↑ 1.0 1 1

Hash Join (cost=2.65..3.92 rows=1 width=17) (actual time=0.078..0.082 rows=1 loops=1)

  • Hash Cond: ((ei_cautipdoc.tdcodcau)::text = (ba_docume_m_4.docodcau)::text)
64. 0.028 0.028 ↑ 1.0 18 1

Seq Scan on ei_cautipdoc001 ei_cautipdoc (cost=0.00..1.23 rows=18 width=12) (actual time=0.025..0.028 rows=18 loops=1)

  • Filter: ((tdcodcom)::text = '000000000000001'::text)
65. 0.008 0.034 ↑ 1.0 1 1

Hash (cost=2.64..2.64 rows=1 width=17) (actual time=0.034..0.034 rows=1 loops=1)

  • Buckets: 1,024 Batches: 1 Memory Usage: 9kB
66. 0.026 0.026 ↓ 0.0 1 1

Index Scan using pk_ba_docume_m001 on ba_docume_m001 ba_docume_m_4 (cost=0.42..2.64rows=1 width=17) (cost=0..0 rows=0 width=0) (actual time=0.025..0.026 rows=1 loops=1)

  • Index Cond: ((doserial)::text = 'ihhhyeahqq'::text)
67. 0.013 0.013 ↑ 1.0 1 1

Index Scan using pk_ei_as_tipdoc on ei_as_tipdoc (cost=0.13..0.33 rows=1 width=25) (actual time=0.013..0.013 rows=1 loops=1)

  • Index Cond: ((tacodice)::text = (ei_cautipdoc.tdtipdocass)::text)
68. 0.000 0.028 ↓ 0.0 0 1

Subquery Scan on *SELECT* 8 (cost=2.78..4.37 rows=1 width=256) (actual time=0.028..0.028 rows=0 loops=1)

69. 0.002 0.028 ↓ 0.0 0 1

Nested Loop (cost=2.78..4.35 rows=1 width=144) (actual time=0.028..0.028 rows=0 loops=1)

70. 0.008 0.024 ↑ 1.0 1 1

Hash Join (cost=2.65..3.92 rows=1 width=16) (actual time=0.021..0.024 rows=1 loops=1)

  • Hash Cond: ((ei_cautipdoc_1.tdcodcau)::text = (ba_docume_m_5.docodcau)::text)
71. 0.006 0.006 ↑ 1.0 18 1

Seq Scan on ei_cautipdoc001 ei_cautipdoc_1 (cost=0.00..1.23 rows=18 width=11) (actual time=0.003..0.006 rows=18 loops=1)

  • Filter: ((tdcodcom)::text = '000000000000001'::text)
72. 0.002 0.010 ↑ 1.0 1 1

Hash (cost=2.64..2.64 rows=1 width=17) (actual time=0.010..0.010 rows=1 loops=1)

  • Buckets: 1,024 Batches: 1 Memory Usage: 9kB
73. 0.008 0.008 ↓ 0.0 1 1

Index Scan using pk_ba_docume_m001 on ba_docume_m001 ba_docume_m_5 (cost=0.42..2.64rows=1 width=17) (cost=0..0 rows=0 width=0) (actual time=0.008..0.008 rows=1 loops=1)

  • Index Cond: ((doserial)::text = 'ihhhyeahqq'::text)
74. 0.002 0.002 ↓ 0.0 0 1

Index Scan using pk_ei_as_tratfis on ei_as_tratfis (cost=0.13..0.33 rows=1 width=25) (actual time=0.002..0.002 rows=0 loops=1)

  • Index Cond: ((tfcodice)::text = (ei_cautipdoc_1.tdtratfis)::text)
75. 0.002 0.049 ↑ 1.0 1 1

Subquery Scan on *SELECT* 9 (cost=2.79..4.32 rows=1 width=256) (actual time=0.045..0.049 rows=1 loops=1)

76. 0.016 0.047 ↑ 1.0 1 1

Nested Loop (cost=2.79..4.30 rows=1 width=144) (actual time=0.043..0.047 rows=1 loops=1)

77. 0.011 0.026 ↑ 1.0 1 1

Hash Join (cost=2.65..3.92 rows=1 width=16) (actual time=0.022..0.026 rows=1 loops=1)

  • Hash Cond: ((ei_cautipdoc_2.tdcodcau)::text = (ba_docume_m_6.docodcau)::text)
78. 0.005 0.005 ↑ 1.0 18 1

Seq Scan on ei_cautipdoc001 ei_cautipdoc_2 (cost=0.00..1.23 rows=18 width=11) (actual time=0.003..0.005 rows=18 loops=1)

  • Filter: ((tdcodcom)::text = '000000000000001'::text)
79. 0.002 0.010 ↑ 1.0 1 1

Hash (cost=2.64..2.64 rows=1 width=17) (actual time=0.010..0.010 rows=1 loops=1)

  • Buckets: 1,024 Batches: 1 Memory Usage: 9kB
80. 0.008 0.008 ↓ 0.0 1 1

Index Scan using pk_ba_docume_m001 on ba_docume_m001 ba_docume_m_6 (cost=0.42..2.64rows=1 width=17) (cost=0..0 rows=0 width=0) (actual time=0.007..0.008 rows=1 loops=1)

  • Index Cond: ((doserial)::text = 'ihhhyeahqq'::text)
81. 0.005 0.005 ↑ 1.0 1 1

Index Scan using pk_ei_as_cardoc on ei_as_cardoc (cost=0.14..0.34 rows=1 width=33) (actual time=0.005..0.005 rows=1 loops=1)

  • Index Cond: ((cacodice)::text = (ei_cautipdoc_2.tdcarass)::text)
82. 0.002 0.130 ↑ 1.0 1 1

Subquery Scan on *SELECT* 10 (cost=0.85..55.80 rows=1 width=256) (actual time=0.087..0.130 rows=1 loops=1)

83. 0.105 0.128 ↑ 1.0 1 1

Nested Loop (cost=0.85..55.78 rows=1 width=144) (actual time=0.085..0.128 rows=1 loops=1)

  • Join Filter: ((NOT (SubPlan 3)) OR (COALESCE(char_length(btrim((ba_docume_2.docoddes)::text)), 0) = 0))
  • -> Index Scan using pk_ba_docume001 on ba_docume001 ba_docume_2 (cost=0.43..52.27 rows=1 width=28)(actual time=0.050..0.091 rows=1 loops=1)
84. 0.008 0.008 ↑ 1.0 1 1

Index Scan using pk_ba_docume_m001 on ba_docume_m001 ba_docume_m_7 (cost=0.42..2.64 rows=1 width=17) (actual time=0.008..0.008 rows=1 loops=1)

  • Index Cond: ((doserial)::text = 'ihhhyeahqq'::text)
  • Index Cond: ((doserial)::text = 'ihhhyeahqq'::text)
  • Filter: ((doflomag > 0) AND (doflripa <> 1) AND (doflgart = ANY ('{1,4,5,7}'::integer[])))
  • Rows Removed by Filter: 44
85.          

SubPlan (for Nested Loop)

86. 0.015 0.015 ↓ 1.3 4 1

Seq Scan on ei_desnoxml_001 ei_desnoxml_2 (cost=0.00..1.62 rows=3 width=5) (actual time=0.014..0.015 rows=4 loops=1)

  • Filter: ((dncodcau)::text = (ba_docume_m_7.docodcau)::text)
  • Rows Removed by Filter: 46
87. 0.001 0.029 ↓ 0.0 0 1

Subquery Scan on *SELECT* 11 (cost=0.00..12.16 rows=1 width=256) (actual time=0.029..0.029 rows=0 loops=1)

88. 0.028 0.028 ↓ 0.0 0 1

Seq Scan on cptmp_epljsdkljl tmp_ei_inforowdoc_2 (cost=0.00..12.14 rows=1 width=144) (actual time=0.028..0.028 rows=0 loops=1)

  • Filter: (((irdocserial)::text = 'ihhhyeahqq'::text) AND ((iridelab)::text = 'ngnejbzowe'::text) AND ((irtipe)::text = 'ST'::text))
  • Rows Removed by Filter: 6
89. 0.002 0.018 ↑ 1.0 1 1

Subquery Scan on *SELECT* 12 (cost=0.42..2.67 rows=1 width=256) (actual time=0.017..0.018 rows=1 loops=1)

90. 0.016 0.016 ↑ 1.0 1 1

Index Only Scan using pk_ba_docume_m001 on ba_docume_m001 ba_docume_m_8 (cost=0.42..2.65 rows=1 width=144) (actual time=0.015..0.016 rows=1 loops=1)

  • Index Cond: (doserial = 'ihhhyeahqq'::text)
  • Heap Fetches: 1
91. 0.005 0.093 ↓ 1.5 6 1

Subquery Scan on *SELECT* 13 (cost=0.85..61.49 rows=4 width=256) (actual time=0.035..0.093 rows=6 loops=1)

92. 0.046 0.088 ↓ 1.5 6 1

Nested Loop (cost=0.85..61.41 rows=4 width=144) (actual time=0.033..0.088 rows=6 loops=1)

  • Join Filter: ((NOT (SubPlan 4)) OR (COALESCE(char_length(btrim((ba_docume_3.docoddes)::text)), 0) = 0))
  • Rows Removed by Join Filter: 1
  • -> Index Scan using pk_ba_docume001 on ba_docume001 ba_docume_3 (cost=0.43..51.93 rows=8 width=24)(actual time=0.010..0.023 rows=7 loops=1)
93. 0.007 0.007 ↑ 1.0 1 1

Index Scan using pk_ba_docume_m001 on ba_docume_m001 ba_docume_m_9 (cost=0.42..2.64 rows=1 width=17) (actual time=0.006..0.007 rows=1 loops=1)

  • Index Cond: ((doserial)::text = 'ihhhyeahqq'::text)
  • Index Cond: ((doserial)::text = 'ihhhyeahqq'::text)
  • Filter: (doflgart = 3)
  • Rows Removed by Filter: 38
94.          

SubPlan (for Nested Loop)

95. 0.035 0.035 ↓ 1.3 4 7

Seq Scan on ei_desnoxml_001 ei_desnoxml_3 (cost=0.00..1.62 rows=3 width=5) (actual time=0.004..0.005 rows=4 loops=7)

  • Filter: ((dncodcau)::text = (ba_docume_m_9.docodcau)::text)
  • Rows Removed by Filter: 46
96. 0.001 0.006 ↓ 0.0 0 1

Subquery Scan on *SELECT* 14 (cost=0.00..12.16 rows=1 width=256) (actual time=0.006..0.006 rows=0 loops=1)

97. 0.005 0.005 ↓ 0.0 0 1

Seq Scan on cptmp_epljsdkljl tmp_ei_inforowdoc_3 (cost=0.00..12.14 rows=1 width=172) (actual time=0.005..0.005 rows=0 loops=1)

  • Filter: (((irdocserial)::text = 'ihhhyeahqq'::text) AND ((iridelab)::text = 'ngnejbzowe'::text) AND ((irtipe)::text = 'PZSCR'::text))
  • Rows Removed by Filter: 6
98. 0.013 0.013 ↓ 0.0 0 1

Subquery Scan on *SELECT* 15 (cost=0.42..2.67 rows=1 width=256) (actual time=0.013..0.013 rows=0 loops=1)

99. 0.000 0.000 ↓ 0.0

Index Scan using pk_ba_docume_m001 on ba_docume_m001 ba_docume_m_10 (cost=0.42..2.65 rows=1 width=144) (actual rows= loops=)

  • Index Cond: ((doserial)::text = 'ihhhyeahqq'::text)
  • Filter: (doflscor = 1)
  • Rows Removed by Filter: 1
100. 0.000 0.001 ↓ 0.0 0 1

Subquery Scan on *SELECT* 16 (cost=0.00..0.01 rows=1 width=256) (actual time=0.001..0.001 rows=0 loops=1)

101. 0.001 0.001 ↓ 0.0 0 1

Result (cost=0.00..0.00 rows=0 width=144) (actual time=0.001..0.001 rows=0 loops=1)

  • One-Time Filter: false
102. 0.000 0.005 ↓ 0.0 0 1

Subquery Scan on *SELECT* 17 (cost=1.00..8.69 rows=1 width=356) (actual time=0.005..0.005 rows=0 loops=1)

103. 0.001 0.005 ↓ 0.0 0 1

Nested Loop (cost=1.00..8.67 rows=1 width=272) (actual time=0.005..0.005 rows=0 loops=1)

  • Join Filter: ((NOT (SubPlan 5)) OR (COALESCE(char_length(btrim((ba_docume_4.docoddes)::text)), 0) = 0))
104. 0.000 0.004 ↓ 0.0 0 1

Nested Loop (cost=0.57..5.01 rows=1 width=259) (actual time=0.004..0.004 rows=0 loops=1)

105. 0.004 0.004 ↓ 0.0 0 1

Index Scan using pk_ei_datgesrow001 on ei_datgesrow001 ei_datgesrow (cost=0.14..2.36 rows=1 width=242) (actual time=0.004..0.004 rows=0 loops=1)

  • Index Cond: ((dgserial)::text = 'ihhhyeahqq'::text)
106. 0.000 0.000 ↓ 0.0 0

Index Scan using pk_ba_docume_m001 on ba_docume_m001 ba_docume_m_11 (cost=0.42..2.64 rows=1 width=17) (never executed)

  • Index Cond: ((doserial)::text = 'ihhhyeahqq'::text)
107. 0.000 0.000 ↓ 0.0 0

Index Scan using pk_ba_docume001 on ba_docume001 ba_docume_4 (cost=0.43..2.65 rows=1 width=24) (never executed)

  • Index Cond: (((doserial)::text = 'ihhhyeahqq'::text) AND (cprownum = ei_datgesrow.dgrownum))
108.          

SubPlan (for Nested Loop)

109. 0.000 0.000 ↓ 0.0 0

Seq Scan on ei_desnoxml_001 ei_desnoxml_4 (cost=0.00..1.62 rows=3 width=5) (never executed)

  • Filter: ((dncodcau)::text = (ba_docume_m_11.docodcau)::text)
110. 0.001 0.011 ↓ 0.0 0 1

Subquery Scan on *SELECT* 18 (cost=0.42..14.19 rows=1 width=346) (actual time=0.011..0.011 rows=0 loops=1)

111. 0.010 0.010 ↓ 0.0 0 1

Nested Loop (cost=0.42..14.17 rows=1 width=262) (actual time=0.010..0.010 rows=0 loops=1)

  • -> Index Only Scan using pk_ba_docume_m001 on ba_docume_m001 ba_docume_m_12 (cost=0.42..2.64 rows=1
112.          

SubPlan (for ba_cliforsed001 ba_cliforsed_1)

113. 0.000 0.000 ↓ 0.0 0

Seq Scan on ei_desnoxml_001 ei_desnoxml_1 (cost=0.00..1.62 rows=3 width=5) (never executed)

  • Filter: ((dncodcau)::text = (ba_docume_m_1.docodcau)::text)
114. 0.000 0.007 ↓ 0.0 1 1

width=11) (cost=0..0 rows=0 width=0) (actual time=0.007..0.007 rows=1 loops=1)

  • Index Cond: (doserial = 'ihhhyeahqq'::text)
  • Heap Fetches: 1
115. 0.002 0.002 ↓ 0.0 0 1

Seq Scan on cptmp_uyhxvqubdz ei_tmpdicint_1 (cost=0.00..11.38 rows=1 width=196) (actual time=0.002..0.002 rows=0 loops=1)

  • Filter: ((diserial)::text = 'ihhhyeahqq'::text)
116. 0.028 0.118 ↓ 2.3 39 1

Hash (cost=20.51..20.51 rows=17 width=4) (actual time=0.118..0.118 rows=39 loops=1)

  • Buckets: 1,024 Batches: 1 Memory Usage: 10kB
117. 0.090 0.090 ↓ 2.3 39 1

Index Only Scan using pk_ei_fattele001 on ei_fattele001 ei_fattele (cost=0.42..20.51 rows=17 width=4) (actual time=0.077..0.090 rows=39 loops=1)

  • Index Cond: (feserial = 'ihhhyeahqq'::text)
  • Heap Fetches: 39
Planning time : 34.826 ms
Execution time : 24,097.253 ms