explain.depesz.com

A tool for finding a real cause for slow queries.

Result: 4wK : s

options
Did it help? Consider supporting us - Bitcoin address: 12v2hUztAk2LgzQ9H9LMwuU32urHMjZQnq
# exclusive inclusive rows x rows loops node
1. 313.237 4678.718 ↑ 137.2 4452 1

Merge Left Join (cost=15517.620..268138.480 rows=610670 width=682) (actual time=1320.218..4678.718 rows=4452 loops=1)

  • Output: public.mygestiuni.idgest, public.mygestiuni.centru, public.mygestiuni.grupagestiune, public.mygestiuni.gestiune, public.mygestiuni.cont, articole.categorie, articole.grupa, articole.subgrupa, articole.brand, articole.denumire, articole.cod, articole.um, docin.info, docin.serie, articole.pretlista, articole.monedalista, ((docin.cantrec)::double precision - COALESCE((sum(CASE ((docout.tipdoc)::text ~~ 'pro%'::text) WHEN CASE_TEST_EXPR THEN 0::double precision ELSE (docout.cantout)::double precision END)), 0::double precision)), articole.garantie, docin.preta, docin.pretv, (((docin.cantrec)::double precision - COALESCE((sum(CASE ((docout.tipdoc)::text ~~ 'pro%'::text) WHEN CASE_TEST_EXPR THEN 0::double precision ELSE (docout.cantout)::double precision END)), 0::double precision)) * (docin.preta)::double precision), docin.cotatva, docin.tipdoc, docin.nrdoc, docin.datdoc, docin.partener, docin.cantrec, docin.nrrec, docin.datarec, docin.partrec, docin.artid, articole.marime, articole.culoare
  • Merge Cond: (tango_seven.three_tango = papa_papa.echo_whiskey)
  • Filter: ((((tango_seven.three_sierra)::double precision - lima_sierra((five(CASE ((papa_papa.golf_five)::text ~~ 'victor'::text) WHEN seven_foxtrot THEN 0::double precision ELSE (papa_papa.india_six)::double precision END)), 0::double precision)) > 1lima_delta-05::double precision) OR (lima_sierra((five(CASE (((papa_papa.golf_five)::text = 'alpha_golf'::text) AND ((papa_papa.oscar_juliet)::text <> 'romeo'::text)) WHEN seven_foxtrot THEN (papa_papa.india_six)::double precision ELSE 0::double precision END)), 0::double precision) <> 0::double precision) OR (lima_sierra((five(CASE ((papa_papa.golf_five)::text ~~ 'victor'::text) WHEN seven_foxtrot THEN (papa_papa.india_six)::double precision ELSE 0::double precision END)), 0::double precision) <> 0::double precision))
2.          

Initplan (forMerge Left Join)

3. 0.186 0.186 ↑ 1.0 1 1

Seq Scan on three_charlie (cost=0.000..6.230 rows=1 width=12) (actual time=0.186..0.186 rows=1 loops=1)

  • Output: public.myvars.username
  • Filter: (golf_romeo((mike.delta.echo_sierra)::text) = golf_romeo((("oscar_two"())::character varying)::text))
4. 557.654 1455.253 ↓ 32.7 185951 1

Sort (cost=15511.390..15525.630 rows=5694 width=678) (actual time=1318.871..1455.253 rows=185951 loops=1)

  • Output: docin.info, docin.serie, docin.cantrec, docin.preta, docin.pretv, docin.cotatva, docin.tipdoc, docin.nrdoc, docin.datdoc, docin.partener, docin.nrrec, docin.datarec, docin.partrec, docin.artid, docin.lot, public.mygestiuni.idgest, public.mygestiuni.centru, public.mygestiuni.grupagestiune, public.mygestiuni.gestiune, public.mygestiuni.cont, articole.categorie, articole.grupa, articole.subgrupa, articole.brand, articole.denumire, articole.cod, articole.um, articole.pretlista, articole.monedalista, articole.garantie, articole.marime, articole.culoare
  • Sort Key: tango_seven.three_tango
  • Sort Method: external merge Disk: 49728kB
5. 323.355 897.599 ↓ 32.7 185951 1

Hash Join (cost=710.050..13441.220 rows=5694 width=678) (actual time=11.889..897.599 rows=185951 loops=1)

  • Output: docin.info, docin.serie, docin.cantrec, docin.preta, docin.pretv, docin.cotatva, docin.tipdoc, docin.nrdoc, docin.datdoc, docin.partener, docin.nrrec, docin.datarec, docin.partrec, docin.artid, docin.lot, public.mygestiuni.idgest, public.mygestiuni.centru, public.mygestiuni.grupagestiune, public.mygestiuni.gestiune, public.mygestiuni.cont, articole.categorie, articole.grupa, articole.subgrupa, articole.brand, articole.denumire, articole.cod, articole.um, articole.pretlista, articole.monedalista, articole.garantie, articole.marime, articole.culoare
  • Hash Cond: (tango_seven.charlie = hotel.xray_foxtrot_quebec)
6. 95.107 563.499 ↓ 32.7 185951 1

Hash Join (cost=53.190..11969.070 rows=5694 width=310) (actual time=1.057..563.499 rows=185951 loops=1)

  • Output: docin.info, docin.serie, docin.cantrec, docin.preta, docin.pretv, docin.cotatva, docin.tipdoc, docin.nrdoc, docin.datdoc, docin.partener, docin.nrrec, docin.datarec, docin.partrec, docin.artid, docin.lot, public.mygestiuni.idgest, public.mygestiuni.centru, public.mygestiuni.grupagestiune, public.mygestiuni.gestiune, public.mygestiuni.cont
  • Hash Cond: (tango_seven.uniform = mike.bravo.xray_foxtrot_charlie)
7. 384.669 468.015 ↓ 3.4 185951 1

Hash Join (cost=42.150..11155.340 rows=54236 width=451) (actual time=0.672..468.015 rows=185951 loops=1)

  • Output: docin.gestid, docin.comandain, docin.artid, docin.lot, docin.cantrec, docin.preta, docin.pretv, docin.cotatva, ((docin.pretv)::double precision * (1::double precision + ((docin.cotatva)::double precision / 100::double precision))), docin.info, docin.serie, docin.loc, docin.fabdate, docin.expdate, docin.lotprodus, docin.datdoc, docin.tipdoc, docin.nrdoc, docin.partener, docin.nrrec, docin.datarec, docin.partrec, docin.lotsursa, docin.taxaverde, docin.moneda, docin.curs
  • Hash Cond: (tango_seven.uniform = mike.bravo.xray_foxtrot_charlie)
8.          

Initplan (forHash Join)

9. 0.164 0.164 ↑ 1.0 1 1

Seq Scan on three_charlie (cost=0.000..6.230 rows=1 width=12) (actual time=0.164..0.164 rows=1 loops=1)

  • Output: public.myvars.username
  • Filter: (golf_romeo((mike.delta.echo_sierra)::text) = golf_romeo((("oscar_two"())::character varying)::text))
10. 0.166 0.166 ↑ 1.0 1 1

Seq Scan on three_charlie (cost=0.000..6.230 rows=1 width=4) (actual time=0.165..0.166 rows=1 loops=1)

  • Output: public.myvars.selgest
  • Filter: (golf_romeo((mike.delta.echo_sierra)::text) = golf_romeo((("oscar_two"())::character varying)::text))
11. 0.000 0.000 ↓ 0.0 0

Seq Scan on three_charlie (cost=0.000..6.230 rows=1 width=4) (actual time=.. rows= loops=0)

  • Output: public.myvars.selgest
  • Filter: (golf_romeo((mike.delta.echo_sierra)::text) = golf_romeo((("oscar_two"())::character varying)::text))
12. 0.164 0.164 ↑ 1.0 1 1

Seq Scan on three_charlie (cost=0.000..6.230 rows=1 width=1) (actual time=0.164..0.164 rows=1 loops=1)

  • Output: public.myvars.selgrupgest
  • Filter: (golf_romeo((mike.delta.echo_sierra)::text) = golf_romeo((("oscar_two"())::character varying)::text))
13. 0.000 0.000 ↓ 0.0 0

Seq Scan on three_charlie (cost=0.000..6.230 rows=1 width=1) (actual time=.. rows= loops=0)

  • Output: public.myvars.selgrupgest
  • Filter: (golf_romeo((mike.delta.echo_sierra)::text) = golf_romeo((("oscar_two"())::character varying)::text))
14. 82.205 82.205 ↑ 1.0 185951 1

Seq Scan on seven_papa (cost=0.000..9221.390 rows=185951 width=451) (actual time=0.006..82.205 rows=185951 loops=1)

  • Output: docin.lot, docin.artid, docin.comandain, docin.gestid, docin.valid, docin.partener, docin.datdoc, docin.tipdoc, docin.nrdoc, docin.nrdocsec, docin.cantrec, docin.cantdoc, docin.cotatva, docin.preta, docin.pretainit, docin.pretv, docin.pretvinit, docin.pretavaluta, docin.moneda, docin.curs, docin.rabat, docin.adaos, docin.info, docin.serie, docin.transport, docin.accize, docin.comisvamal, docin.taxavamala, docin.lotsursa, docin.lotlans, docin.taxaverde, docin.costdirect, docin.costutilaj, docin.costmanop, docin.nrrec, docin.datarec, docin.partrec, docin.userid, docin.datemodified, docin.fabdate, docin.expdate, docin.cantbuc, docin.cantfolie, docin.cantbox, docin.cantpalet, docin.tmpnrcrt, docin.lotprodus, docin.loc, docin.plista
  • Filter: (tango_seven.xray_three AND ((tango_seven.golf_five)::text !~~ 'victor'::text))
15. 0.017 0.647 ↓ 3.6 36 1

Hash (cost=10.890..10.890 rows=10 width=8) (actual time=0.647..0.647 rows=36 loops=1)

  • Output: public.mygestiuni.idgest, public.user_gest.gest
  • Buckets: 1024 Batches: 1 Memory Usage: 2kB
16. 0.033 0.630 ↓ 3.6 36 1

Hash Join (cost=6.450..10.890 rows=10 width=8) (actual time=0.587..0.630 rows=36 loops=1)

  • Output: public.mygestiuni.idgest, public.user_gest.gest
  • Hash Cond: (mike.four.yankee_papa = mike.bravo.xray_foxtrot_charlie)
17. 0.020 0.214 ↓ 1.7 36 1

Bitmap Heap Scan on november (cost=4.410..8.680 rows=21 width=4) (actual time=0.198..0.214 rows=36 loops=1)

  • Output: public.user_gest.idug, public.user_gest.username, public.user_gest.gest
  • Recheck Cond: ((mike.four.echo_sierra)::text = ($1)::text)
18. 0.194 0.194 ↓ 1.7 36 1

Bitmap Index Scan on tango_yankee (cost=0.000..4.410 rows=21 width=0) (actual time=0.194..0.194 rows=36 loops=1)

  • Index Cond: ((mike.four.echo_sierra)::text = ($1)::text)
19. 0.015 0.383 ↓ 2.0 36 1

Hash (cost=1.810..1.810 rows=18 width=4) (actual time=0.383..0.383 rows=36 loops=1)

  • Output: public.mygestiuni.idgest
  • Buckets: 1024 Batches: 1 Memory Usage: 2kB
20. 0.368 0.368 ↓ 2.0 36 1

Seq Scan on papa_xray (cost=0.000..1.810 rows=18 width=4) (actual time=0.339..0.368 rows=36 loops=1)

  • Output: public.mygestiuni.idgest
  • Filter: CASE ($2 <> 0) WHEN seven_foxtrot THEN (mike.bravo.xray_foxtrot_charlie = $3) ELSE CASE (($4)::text <> ''::text) WHEN seven_foxtrot THEN ((mike.bravo.three_five)::text = ($5)::text) ELSE (mike.bravo.xray_foxtrot_charlie <> 0) END END
21. 0.025 0.377 ↓ 1.7 36 1

Hash (cost=10.770..10.770 rows=21 width=51) (actual time=0.377..0.377 rows=36 loops=1)

  • Output: public.mygestiuni.idgest, public.mygestiuni.centru, public.mygestiuni.grupagestiune, public.mygestiuni.gestiune, public.mygestiuni.cont, public.user_gest.gest
  • Buckets: 1024 Batches: 1 Memory Usage: 4kB
22. 0.047 0.352 ↓ 1.7 36 1

Hash Join (cost=6.220..10.770 rows=21 width=51) (actual time=0.296..0.352 rows=36 loops=1)

  • Output: public.mygestiuni.idgest, public.mygestiuni.centru, public.mygestiuni.grupagestiune, public.mygestiuni.gestiune, public.mygestiuni.cont, public.user_gest.gest
  • Hash Cond: (mike.four.yankee_papa = mike.bravo.xray_foxtrot_charlie)
23. 0.025 0.252 ↓ 1.7 36 1

Bitmap Heap Scan on november (cost=4.410..8.680 rows=21 width=4) (actual time=0.235..0.252 rows=36 loops=1)

  • Output: public.user_gest.idug, public.user_gest.username, public.user_gest.gest
  • Recheck Cond: ((mike.four.echo_sierra)::text = ($0)::text)
24. 0.227 0.227 ↓ 1.7 36 1

Bitmap Index Scan on tango_yankee (cost=0.000..4.410 rows=21 width=0) (actual time=0.227..0.227 rows=36 loops=1)

  • Index Cond: ((mike.four.echo_sierra)::text = ($0)::text)
25. 0.032 0.053 ↑ 1.0 36 1

Hash (cost=1.360..1.360 rows=36 width=47) (actual time=0.053..0.053 rows=36 loops=1)

  • Output: public.mygestiuni.idgest, public.mygestiuni.centru, public.mygestiuni.grupagestiune, public.mygestiuni.gestiune, public.mygestiuni.cont
  • Buckets: 1024 Batches: 1 Memory Usage: 3kB
26. 0.021 0.021 ↑ 1.0 36 1

Seq Scan on papa_xray (cost=0.000..1.360 rows=36 width=47) (actual time=0.007..0.021 rows=36 loops=1)

  • Output: public.mygestiuni.idgest, public.mygestiuni.centru, public.mygestiuni.grupagestiune, public.mygestiuni.gestiune, public.mygestiuni.cont
27. 5.092 10.745 ↑ 1.0 5505 1

Hash (cost=319.050..319.050 rows=5505 width=372) (actual time=10.745..10.745 rows=5505 loops=1)

  • Output: articole.categorie, articole.grupa, articole.subgrupa, articole.brand, articole.denumire, articole.cod, articole.um, articole.pretlista, articole.monedalista, articole.garantie, articole.marime, articole.culoare, articole.idart
  • Buckets: 1024 Batches: 4 Memory Usage: 174kB
28. 5.653 5.653 ↑ 1.0 5505 1

Seq Scan on india_alpha (cost=0.000..319.050 rows=5505 width=372) (actual time=0.006..5.653 rows=5505 loops=1)

  • Output: articole.categorie, articole.grupa, articole.subgrupa, articole.brand, articole.denumire, articole.cod, articole.um, articole.pretlista, articole.monedalista, articole.garantie, articole.marime, articole.culoare, articole.idart
29. 52.131 2910.042 ↓ 8.6 183948 1

Materialize (cost=0.000..226694.570 rows=21447 width=28) (actual time=0.122..2910.042 rows=183948 loops=1)

  • Output: docout.lotout, (sum(CASE ((docout.tipdoc)::text ~~ 'pro%'::text) WHEN CASE_TEST_EXPR THEN 0::double precision ELSE (docout.cantout)::double precision END)), (sum(CASE (((docout.tipdoc)::text = 'tvliv'::text) AND ((docout.nrdocsec)::text <> 'validat'::text)) WHEN CASE_TEST_EXPR THEN (docout.cantout)::double precision ELSE 0::double precision END)), (sum(CASE ((docout.tipdoc)::text ~~ 'pro%'::text) WHEN CASE_TEST_EXPR THEN (docout.cantout)::double precision ELSE 0::double precision END))
30. 1769.847 2857.911 ↓ 8.6 183948 1

GroupAggregate (cost=0.000..226426.480 rows=21447 width=18) (actual time=0.120..2857.911 rows=183948 loops=1)

  • Output: docout.lotout, sum(CASE ((docout.tipdoc)::text ~~ 'pro%'::text) WHEN CASE_TEST_EXPR THEN 0::double precision ELSE (docout.cantout)::double precision END), sum(CASE (((docout.tipdoc)::text = 'tvliv'::text) AND ((docout.nrdocsec)::text <> 'validat'::text)) WHEN CASE_TEST_EXPR THEN (docout.cantout)::double precision ELSE 0::double precision END), sum(CASE ((docout.tipdoc)::text ~~ 'pro%'::text) WHEN CASE_TEST_EXPR THEN (docout.cantout)::double precision ELSE 0::double precision END)
31. 1088.064 1088.064 ↓ 1.0 1501045 1

Index Scan using alpha_xray on yankee_lima (cost=0.000..184937.180 rows=1500903 width=18) (actual time=0.021..1088.064 rows=1501045 loops=1)

  • Output: docout.idout, docout.lotout, docout.comandaout, docout.valid, docout.partener, docout.datdoc, docout.tipdoc, docout.nrdoc, docout.nrdocsec, docout.cantout, docout.pret, docout.pretdef, docout.moneda, docout.curs, docout.infoiesiri, docout.lotprod, docout.rabat, docout.gesttransfer, docout.stornoid, docout.userid, docout.datemodified, docout.trlocdest, docout.pickid, docout.nrpicking, docout.datapicking, docout.cantpick, docout.grnet_out
  • Filter: papa_papa.xray_three