explain.depesz.com

PostgreSQL's explain analyze made readable

Result: LlxK

Settings
# exclusive inclusive rows x rows loops node
1. 0.281 406.850 ↑ 2.1 319 1

Nested Loop (cost=55,350.20..59,256.54 rows=654 width=44) (actual time=341.830..406.850 rows=319 loops=1)

  • Output: ka.idacc, alp.positionmode, ((alp.position1 - kiop.info1) + 1), CASE WHEN (alp.position1 = kiop.info1) THEN ((alp.position2 - kiop.info2) + 1) ELSE alp.position2 END, CASE WHEN (alp.position3 = (-1)) THEN alp.position3 ELSE ((alp.position3 - kiop.info1) + 1) END, CASE WHEN ((alp.position3 = kiop.info1) AND (alp.position4 <> (-1))) THEN ((alp.position4 - kiop.info2) + 1) ELSE alp.position4 END, kiop.prop, kiop.idobjref, ka.isprototype
  • Buffers: local hit=3723 read=3366
2.          

CTE kbacc

3. 29.091 124.062 ↑ 1.0 355,258 1

Result (cost=0.00..6,996.40 rows=366,540 width=16) (actual time=0.022..124.062 rows=355,258 loops=1)

  • Output: kia.idacc, kia.idclr, kia.idcle, kia.isprototype
  • Buffers: local hit=695 read=2626
4. 20.824 94.971 ↑ 1.0 355,258 1

Append (cost=0.00..6,996.40 rows=366,540 width=16) (actual time=0.022..94.971 rows=355,258 loops=1)

  • Buffers: local hit=695 read=2626
5. 74.147 74.147 ↑ 1.0 355,258 1

Seq Scan on pg_temp_3.kb_insertacc kia (cost=0.00..6,974.10 rows=365,310 width=16) (actual time=0.020..74.147 rows=355,258 loops=1)

  • Output: kia.idacc, kia.idclr, kia.idcle, kia.isprototype
  • Buffers: local hit=695 read=2626
6. 0.000 0.000 ↓ 0.0 0 1

Seq Scan on pg_temp_3.kb_updateacc kua (cost=0.00..22.30 rows=1,230 width=16) (actual time=0.000..0.000 rows=0 loops=1)

  • Output: kua.idacc, kua.idclr, kua.idcle, kua.isprototype
7. 0.048 405.931 ↑ 2.1 319 1

Nested Loop (cost=48,353.80..52,013.85 rows=654 width=52) (actual time=341.790..405.931 rows=319 loops=1)

  • Output: ka.idacc, ka.isprototype, kwli.linkid, alp.positionmode, alp.position1, alp.position2, alp.position3, alp.position4, alp.linkid, kiop.info1, kiop.info2, kiop.prop, kiop.idobjref
  • Buffers: local hit=2488 read=3322
8. 0.087 405.245 ↑ 2.6 319 1

Nested Loop (cost=48,353.80..51,745.10 rows=822 width=28) (actual time=341.768..405.245 rows=319 loops=1)

  • Output: ka.idacc, ka.isprototype, kwli.linkid, kiop.info1, kiop.info2, kiop.prop, kiop.idobjref
  • Buffers: local hit=1249 read=3283
9. 45.224 404.252 ↑ 1.5 151 1

Merge Join (cost=48,353.80..51,646.38 rows=221 width=24) (actual time=341.707..404.252 rows=151 loops=1)

  • Output: ka.idacc, ka.isprototype, kiop.info1, kiop.info2, kiop.prop, kiop.idobjref
  • Merge Cond: ((ka.idclr = kiop.idobj) AND (ka.idcle = kiop.idobjref))
  • Buffers: local hit=703 read=3220
10. 78.752 314.750 ↑ 1.0 355,257 1

Sort (cost=41,205.71..42,122.06 rows=366,540 width=16) (actual time=301.593..314.750 rows=355,257 loops=1)

  • Output: ka.idacc, ka.isprototype, ka.idclr, ka.idcle
  • Sort Key: ka.idclr, ka.idcle
  • Sort Method: quicksort Memory: 28941kB
  • Buffers: local hit=695 read=2626
11. 235.998 235.998 ↑ 1.0 355,258 1

CTE Scan on kbacc ka (cost=0.00..7,330.80 rows=366,540 width=16) (actual time=0.024..235.998 rows=355,258 loops=1)

  • Output: ka.idacc, ka.isprototype, ka.idclr, ka.idcle
  • Buffers: local hit=695 read=2626
12. 31.706 44.278 ↑ 1.0 72,176 1

Sort (cost=7,148.09..7,328.53 rows=72,176 width=20) (actual time=39.614..44.278 rows=72,176 loops=1)

  • Output: kiop.info1, kiop.info2, kiop.prop, kiop.idobjref, kiop.idobj
  • Sort Key: kiop.idobj, kiop.idobjref
  • Sort Method: quicksort Memory: 8711kB
  • Buffers: local hit=8 read=594
13. 12.572 12.572 ↑ 1.0 72,176 1

Seq Scan on pg_temp_3.kb_insertobjpos kiop (cost=0.00..1,323.76 rows=72,176 width=20) (actual time=0.033..12.572 rows=72,176 loops=1)

  • Output: kiop.info1, kiop.info2, kiop.prop, kiop.idobjref, kiop.idobj
  • Buffers: local hit=8 read=594
14. 0.906 0.906 ↑ 2.0 2 151

Index Scan using idx_kb_work_linkids_idacc on pg_temp_3.kb_work_linkids kwli (cost=0.00..0.41 rows=4 width=8) (actual time=0.006..0.006 rows=2 loops=151)

  • Output: kwli.linkid, kwli.linkkind, kwli.idacc
  • Index Cond: (kwli.idacc = ka.idacc)
  • Filter: ('S'::bpchar = kwli.linkkind)
  • Buffers: local hit=546 read=63
15. 0.638 0.638 ↑ 1.0 1 319

Index Scan using idx_amt_linkpositions_linkid on pg_temp_3.amt_linkpositions alp (cost=0.00..0.32 rows=1 width=24) (actual time=0.002..0.002 rows=1 loops=319)

  • Output: alp.linkid, alp.sourceid, alp.sourcekind, alp.sequencenumber, alp.positionmode, alp.position1, alp.position2, alp.position3, alp.position4, alp.groupnumber
  • Index Cond: (alp.linkid = kwli.linkid)
  • Buffers: local hit=1239 read=39
16. 0.638 0.638 ↑ 1.0 1 319

Index Only Scan using idx_amt_links_linkid_callerid_callerkind on pg_temp_3.amt_links al (cost=0.00..0.34 rows=1 width=4) (actual time=0.002..0.002 rows=1 loops=319)

  • Output: al.linkid, al.callerid, al.callerkind
  • Index Cond: (al.linkid = kwli.linkid)
  • Heap Fetches: 319
  • Buffers: local hit=1235 read=44