explain.depesz.com

PostgreSQL's explain analyze made readable

Result: OcwF

Settings
# exclusive inclusive rows x rows loops node
1. 2.177 334.655 ↓ 1,813.0 1,813 1

Sort (cost=522.83..522.84 rows=1 width=687) (actual time=334.541..334.655 rows=1,813 loops=1)

  • Sort Key: iri.number
  • Sort Method: quicksort Memory: 946kB
2. 6.662 332.478 ↓ 1,813.0 1,813 1

Nested Loop Semi Join (cost=5.40..522.82 rows=1 width=687) (actual time=12.678..332.478 rows=1,813 loops=1)

3. 1.096 309.499 ↓ 1,813.0 1,813 1

Nested Loop (cost=5.40..520.78 rows=1 width=208) (actual time=12.638..309.499 rows=1,813 loops=1)

4. 13.107 304.777 ↓ 1,813.0 1,813 1

Nested Loop (cost=4.97..512.51 rows=1 width=204) (actual time=12.628..304.777 rows=1,813 loops=1)

  • Join Filter: ((firp.inventoryregisterid)::integer = (fir.inventoryregisterid)::integer)
  • Rows Removed by Join Filter: 108,780
5. 0.000 282.605 ↓ 1,813.0 1,813 1

Nested Loop (cost=4.97..510.14 rows=1 width=197) (actual time=12.601..282.605 rows=1,813 loops=1)

6. 18.631 196.589 ↓ 23,453.0 46,906 1

Merge Join (cost=4.69..509.53 rows=2 width=185) (actual time=0.217..196.589 rows=46,906 loops=1)

  • Merge Cond: ((irp.inventoryregisterid)::integer = (ir.inventoryregisterid)::integer)
7. 25.713 177.878 ↓ 23,453.0 46,906 1

Nested Loop (cost=1.27..1,010.29 rows=2 width=176) (actual time=0.120..177.878 rows=46,906 loops=1)

8. 19.719 58.353 ↓ 23,453.0 46,906 1

Nested Loop (cost=0.85..993.76 rows=2 width=93) (actual time=0.107..58.353 rows=46,906 loops=1)

9. 0.432 1.146 ↓ 11.4 2,343 1

Nested Loop (cost=0.43..30.29 rows=205 width=12) (actual time=0.087..1.146 rows=2,343 loops=1)

10. 0.050 0.050 ↑ 1.0 1 1

Index Scan using inventoryregisters_pkey on inventoryregisters (cost=0.14..13.21 rows=1 width=4) (actual time=0.049..0.050 rows=1 loops=1)

  • Filter: ((maininventoryregisterid)::integer = 189)
  • Rows Removed by Filter: 64
11. 0.664 0.664 ↓ 11.7 2,343 1

Index Scan using i_inventoryregisterparts_inventoryregisterid on inventoryregisterparts irp (cost=0.29..15.07 rows=201 width=8) (actual time=0.035..0.664 rows=2,343 loops=1)

  • Index Cond: ((inventoryregisterid)::integer = (inventoryregisters.inventoryregisterid)::integer)
12. 37.488 37.488 ↓ 20.0 20 2,343

Index Scan using i_inventoryregisteritems_inventoryregisterpartid on inventoryregisteritems iri (cost=0.42..4.69 rows=1 width=89) (actual time=0.004..0.016 rows=20 loops=2,343)

  • Index Cond: ((inventoryregisterpartid)::integer = (irp.inventoryregisterpartid)::integer)
  • Filter: ((NOT iscommitedfinal) AND ((inventoryregisterid)::integer = 189) AND ((maininventoryregisteritemid)::integer = (inventoryregisteritemid)::integer))
  • Rows Removed by Filter: 2
13. 93.812 93.812 ↑ 1.0 1 46,906

Index Scan using inventoryregisteritems_pkey on inventoryregisteritems firi (cost=0.42..8.27 rows=1 width=87) (actual time=0.002..0.002 rows=1 loops=46,906)

  • Index Cond: ((inventoryregisteritemid)::integer = (iri.finalinventoryregisteritemid)::integer)
14. 0.043 0.080 ↓ 1.0 64 1

Sort (cost=3.42..3.57 rows=61 width=17) (actual time=0.074..0.080 rows=64 loops=1)

  • Sort Key: ir.inventoryregisterid
  • Sort Method: quicksort Memory: 29kB
15. 0.037 0.037 ↓ 1.1 65 1

Seq Scan on inventoryregisters ir (cost=0.00..1.61 rows=61 width=17) (actual time=0.010..0.037 rows=65 loops=1)

16. 93.812 93.812 ↓ 0.0 0 46,906

Index Scan using inventoryregisterparts_pkey on inventoryregisterparts firp (cost=0.29..0.30 rows=1 width=16) (actual time=0.002..0.002 rows=0 loops=46,906)

  • Index Cond: ((inventoryregisterpartid)::integer = (firi.inventoryregisterpartid)::integer)
  • Filter: (checkuserid IS NOT NULL)
  • Rows Removed by Filter: 1
17. 9.065 9.065 ↑ 1.0 61 1,813

Seq Scan on inventoryregisters fir (cost=0.00..1.61 rows=61 width=15) (actual time=0.002..0.005 rows=61 loops=1,813)

18. 3.626 3.626 ↑ 1.0 1 1,813

Index Scan using inventoryregisteritems_pkey on inventoryregisteritems miri (cost=0.42..8.27 rows=1 width=8) (actual time=0.002..0.002 rows=1 loops=1,813)

  • Index Cond: ((inventoryregisteritemid)::integer = (iri.maininventoryregisteritemid)::integer)
19. 16.317 16.317 ↑ 1.0 1 1,813

Seq Scan on inventoryregisters inventoryregisters_1 (cost=0.00..1.92 rows=1 width=4) (actual time=0.009..0.009 rows=1 loops=1,813)

  • Filter: (((maininventoryregisterid)::integer = 189) AND ((inventoryregisterid)::integer = 189))
  • Rows Removed by Filter: 60
Planning time : 9.155 ms
Execution time : 335.026 ms