explain.depesz.com

PostgreSQL's explain analyze made readable

Result: SvTG

Settings
# exclusive inclusive rows x rows loops node
1. 9.089 19,586.665 ↑ 1.0 4,986 1

Sort (cost=3,900,977.45..3,900,978.69 rows=4,986 width=30) (actual time=19,586.429..19,586.665 rows=4,986 loops=1)

  • Sort Key: ff.foldername
  • Sort Method: quicksort Memory: 600kB
2. 7.526 19,577.576 ↑ 1.0 4,986 1

Seq Scan on filefolder ff (cost=0.00..3,900,946.82 rows=4,986 width=30) (actual time=15.515..19,577.576 rows=4,986 loops=1)

3.          

SubPlan (for Seq Scan)

4. 14.958 19,570.050 ↑ 1.0 1 4,986

Aggregate (cost=782.36..782.37 rows=1 width=8) (actual time=3.925..3.925 rows=1 loops=4,986)

5. 1,049.075 19,555.092 ↑ 2.0 3 4,986

Merge Join (cost=0.49..782.36 rows=6 width=4) (actual time=3.660..3.922 rows=3 loops=4,986)

  • Merge Cond: (f.fileid = f_1.fileid)
6. 14.958 34.902 ↑ 2.0 3 4,986

Sort (cost=0.44..0.44 rows=6 width=4) (actual time=0.007..0.007 rows=3 loops=4,986)

  • Sort Key: f.fileid
  • Sort Method: quicksort Memory: 25kB
7. 19.944 19.944 ↑ 2.0 3 4,986

Index Scan using ix_file_folderid on file f (cost=0.03..0.43 rows=6 width=4) (actual time=0.003..0.004 rows=3 loops=4,986)

  • Index Cond: (folderid = ff.filefolderid)
8. 2,470.455 18,471.115 ↑ 1.9 7,966 2,665

Group (cost=0.06..624.25 rows=15,376 width=4) (actual time=0.009..6.931 rows=7,966 loops=2,665)

  • Group Key: f_1.fileid
9. 4,759.690 16,000.660 ↑ 2.0 9,580 2,665

Merge Left Join (cost=0.06..619.35 rows=19,627 width=4) (actual time=0.009..6.004 rows=9,580 loops=2,665)

  • Merge Cond: (f_1.fileid = fp.fileid)
10. 7,907.055 7,907.055 ↑ 1.9 7,966 2,665

Index Scan using ix_fileobjects_pkey on file f_1 (cost=0.03..199.21 rows=15,376 width=4) (actual time=0.006..2.967 rows=7,966 loops=2,665)

  • Filter: ((dateremoved IS NULL) AND (filetypeid = 27))
  • Rows Removed by Filter: 8
11. 3,333.915 3,333.915 ↑ 2.1 9,479 2,665

Index Only Scan using ix_filepermission_fileid on filepermission fp (cost=0.03..215.12 rows=19,637 width=4) (actual time=0.003..1.251 rows=9,479 loops=2,665)

  • Heap Fetches: 2,975,884
Planning time : 0.670 ms
Execution time : 19,586.837 ms