explain.depesz.com

A tool for finding a real cause for slow queries.

Result: r5B

options
Did it help? Consider supporting us - Bitcoin address: 12v2hUztAk2LgzQ9H9LMwuU32urHMjZQnq
# exclusive inclusive rows x rows loops node
1. 59.426 718.804 ↓ 0.0 0 1

Merge Full Join (cost=19,492.44..22,481.36 rows=24,155 width=0) (actual time=718.804..718.804 rows=0 loops=1)

  • Merge Cond: ((pmst.pmfid = pu.pmfid) AND (pmst.cikkid = pu.cikkid) AND (pmst.dokumentumtipusid = pu.dokumentumtipusid) AND ((COALESCE(pmst.mennyegysegid, 0)) = (COALESCE(pu.mennyegysegid, 0))) AND ((COALESCE(round((pmst.eladafakulcs)::numeric, 4), 0::numeric)) = (COALESCE(round((pu.eladafakulcs)::numeric, 4), 0::numeric))) AND ((COALESCE(round((pmst.eladlistaar)::numeric, 4), 0::numeric)) = (COALESCE(round((pu.eladlistaar)::numeric, 4), 0::numeric))) AND ((COALESCE(round((pmst.eladlistaarelszdeviza)::numeric, 4), 0::numeric)) = (COALESCE(round((pu.eladlistaarelszdeviza)::numeric, 4), 0::numeric))) AND ((COALESCE(pmst.elszamolodevizaid, 0)) = (COALESCE(pu.elszamolodevizaid, 0))) AND ((COALESCE(round((pmst.engedmeny)::numeric, 4), 0::numeric)) = (COALESCE(round((pu.engedmeny)::numeric, 4), 0::numeric))) AND ((COALESCE(pmst.eladafakulcsid, 0)) = (COALESCE(pu.eladafakulcsid, 0))))
  • Filter: (COALESCE(pmst.mennyiseg, 0::double precision) <> COALESCE(pu.mennyiseg, 0::double precision))
2. 44.488 346.780 ↑ 1.1 22,617 1

Sort (cost=10,573.53..10,634.22 rows=24,276 width=64) (actual time=341.603..346.780 rows=22,617 loops=1)

  • Sort Key: pmst.pmfid, pmst.cikkid, pmst.dokumentumtipusid, (COALESCE(pmst.mennyegysegid, 0)), (COALESCE(round((pmst.eladafakulcs)::numeric, 4), 0::numeric)), (COALESCE(round((pmst.eladlistaar)::numeric, 4), 0::numeric)), (COALESCE(round((pmst.eladlistaarelszdeviza)::numeric, 4), 0::numeric)), (COALESCE(pmst.elszamolodevizaid, 0)), (COALESCE(round((pmst.engedmeny)::numeric, 4), 0::numeric)), (COALESCE(pmst.eladafakulcsid, 0))
  • Sort Method: external sort Disk: 2928kB
3. 166.764 302.292 ↑ 1.1 22,617 1

Subquery Scan pmst (cost=6,617.37..7,891.86 rows=24,276 width=64) (actual time=99.076..302.292 rows=22,617 loops=1)

4. 27.143 135.528 ↑ 1.1 22,617 1

GroupAggregate (cost=6,617.37..7,649.10 rows=24,276 width=64) (actual time=99.042..135.528 rows=22,617 loops=1)

5. 52.703 108.385 ↓ 1.0 24,822 1

Sort (cost=6,617.37..6,678.06 rows=24,276 width=64) (actual time=99.027..108.385 rows=24,822 loops=1)

  • Sort Key: pmf.id, pmt.cikkid, pmf.dokumentumtipusid, pmt.mennyegysegid, pmt.eladafakulcs, pmt.eladlistaar, pmt.eladlistaarelszdeviza, pmt.elszamolodevizaid, pmt.engedmeny, pmt.eladafakulcsid
  • Sort Method: external merge Disk: 2128kB
6. 34.824 55.682 ↓ 1.0 24,822 1

Hash Join (cost=1,487.75..3,935.70 rows=24,276 width=64) (actual time=13.528..55.682 rows=24,822 loops=1)

  • Hash Cond: (pmt.pugyimozgasfejid = pmf.id)
7. 7.369 7.369 ↑ 1.0 37,187 1

Seq Scan on pugyimozgassubtetel pmt (cost=0.00..1,693.87 rows=37,187 width=60) (actual time=0.011..7.369 rows=37,187 loops=1)

8. 4.054 13.489 ↓ 1.2 10,534 1

Hash (cost=1,373.85..1,373.85 rows=9,112 width=8) (actual time=13.489..13.489 rows=10,534 loops=1)

9. 9.435 9.435 ↓ 1.2 10,534 1

Seq Scan on pugyimozgasfej pmf (cost=0.00..1,373.85 rows=9,112 width=8) (actual time=0.010..9.435 rows=10,534 loops=1)

  • Filter: (dokumentumtipusid = ANY ('{36,39,7,9,38,63,59,50,51,41,62,58,86,40}'::integer[]))
10. 4.707 312.598 ↓ 1.1 22,617 1

Materialize (cost=8,918.91..9,168.96 rows=20,004 width=64) (actual time=302.270..312.598 rows=22,617 loops=1)

11. 44.874 307.891 ↓ 1.1 22,617 1

Sort (cost=8,918.91..8,968.92 rows=20,004 width=64) (actual time=302.264..307.891 rows=22,617 loops=1)

  • Sort Key: pu.pmfid, pu.cikkid, pu.dokumentumtipusid, (COALESCE(pu.mennyegysegid, 0)), (COALESCE(round((pu.eladafakulcs)::numeric, 4), 0::numeric)), (COALESCE(round((pu.eladlistaar)::numeric, 4), 0::numeric)), (COALESCE(round((pu.eladlistaarelszdeviza)::numeric, 4), 0::numeric)), (COALESCE(pu.elszamolodevizaid, 0)), (COALESCE(round((pu.engedmeny)::numeric, 4), 0::numeric)), (COALESCE(pu.eladafakulcsid, 0))
  • Sort Method: external sort Disk: 2928kB
12. 166.480 263.017 ↓ 1.1 22,617 1

Subquery Scan pu (cost=5,687.12..6,737.33 rows=20,004 width=64) (actual time=62.871..263.017 rows=22,617 loops=1)

13. 25.259 96.537 ↓ 1.1 22,617 1

GroupAggregate (cost=5,687.12..6,537.29 rows=20,004 width=64) (actual time=62.836..96.537 rows=22,617 loops=1)

14. 38.265 71.278 ↓ 1.2 23,104 1

Sort (cost=5,687.12..5,737.13 rows=20,004 width=64) (actual time=62.821..71.278 rows=23,104 loops=1)

  • Sort Key: pmf.id, pmt.cikkid, pmf.dokumentumtipusid, pmt.mennyegysegid, pmt.eladafakulcs, pmt.eladlistaar, pmt.eladlistaarelszdeviza, pmt.elszamolodevizaid, pmt.engedmeny, pmt.eladafakulcsid
  • Sort Method: external merge Disk: 1984kB
15. 20.779 33.013 ↓ 1.2 23,104 1

Hash Join (cost=1,487.75..3,505.53 rows=20,004 width=64) (actual time=7.281..33.013 rows=23,104 loops=1)

  • Hash Cond: (pmt.pugyimozgasfejid = pmf.id)
16. 4.985 4.985 ↑ 1.0 30,642 1

Seq Scan on pugyimozgastetel pmt (cost=0.00..1,396.42 rows=30,642 width=60) (actual time=0.014..4.985 rows=30,642 loops=1)

17. 2.029 7.249 ↓ 1.2 10,534 1

Hash (cost=1,373.85..1,373.85 rows=9,112 width=8) (actual time=7.249..7.249 rows=10,534 loops=1)

18. 5.220 5.220 ↓ 1.2 10,534 1

Seq Scan on pugyimozgasfej pmf (cost=0.00..1,373.85 rows=9,112 width=8) (actual time=0.011..5.220 rows=10,534 loops=1)

  • Filter: (dokumentumtipusid = ANY ('{36,39,7,9,38,63,59,50,51,41,62,58,86,40}'::integer[]))