explain.depesz.com

PostgreSQL's explain analyze made readable

Result: b51Q

Settings
# exclusive inclusive rows x rows loops node
1. 106.139 4,432.121 ↓ 4.6 375,502 1

Hash Left Join (cost=1,989.47..4,427.59 rows=81,926 width=4) (actual time=4,237.703..4,432.121 rows=375,502 loops=1)

  • Hash Cond: ("ctgtsFlVers".id = "ctgtsFlVers_ctgtsFlTypes".ctgts_fl_vers_id)
2. 86.226 4,324.612 ↓ 4.6 375,502 1

Hash Right Join (cost=1,842.22..3,174.01 rows=81,926 width=8) (actual time=4,236.318..4,324.612 rows=375,502 loops=1)

  • Hash Cond: ("ctsIns_ctsInsStatuses".cts_ins_id = "ctsIns".id)
3. 2.804 2.804 ↓ 1.0 23,378 1

Seq Scan on cts_ins_statuses_vers "ctsIns_ctsInsStatuses" (cost=0.00..337.44 rows=23,344 width=8) (actual time=0.011..2.804 rows=23,378 loops=1)

4. 2.906 4,235.582 ↓ 2.1 15,361 1

Hash (cost=1,750.45..1,750.45 rows=7,342 width=12) (actual time=4,235.582..4,235.582 rows=15,361 loops=1)

  • Buckets: 16384 (originally 8192) Batches: 1 (originally 1) Memory Usage: 789kB
5. 4.158 4,232.676 ↓ 2.1 15,361 1

Hash Right Join (cost=1,548.78..1,750.45 rows=7,342 width=12) (actual time=4,226.521..4,232.676 rows=15,361 loops=1)

  • Hash Cond: ("ctsIns_ctsInsSide".cts_ins_id = "ctsIns".id)
6. 1.676 8.115 ↓ 1.0 5,535 1

Hash Left Join (cost=363.57..471.44 rows=5,433 width=8) (actual time=4.091..8.115 rows=5,535 loops=1)

  • Hash Cond: ("ctsInsSide".ctgts_fl_vers_id = "ctgtsFlVers".id)
7. 1.806 4.297 ↓ 1.0 5,535 1

Hash Left Join (cost=156.24..249.85 rows=5,433 width=8) (actual time=1.938..4.297 rows=5,535 loops=1)

  • Hash Cond: ("ctsIns_ctsInsSide".cts_ins_sides_id = "ctsInsSide".id)
8. 0.571 0.571 ↓ 1.0 5,535 1

Seq Scan on cts_ins_sides_vers "ctsIns_ctsInsSide" (cost=0.00..79.33 rows=5,433 width=8) (actual time=0.008..0.571 rows=5,535 loops=1)

9. 0.906 1.920 ↓ 1.0 5,535 1

Hash (cost=88.33..88.33 rows=5,433 width=12) (actual time=1.920..1.920 rows=5,535 loops=1)

  • Buckets: 8192 Batches: 1 Memory Usage: 302kB
10. 1.014 1.014 ↓ 1.0 5,535 1

Seq Scan on cts_ins_sides "ctsInsSide" (cost=0.00..88.33 rows=5,433 width=12) (actual time=0.007..1.014 rows=5,535 loops=1)

11. 0.945 2.142 ↑ 1.0 5,536 1

Hash (cost=137.70..137.70 rows=5,570 width=12) (actual time=2.142..2.142 rows=5,536 loops=1)

  • Buckets: 8192 Batches: 1 Memory Usage: 302kB
12. 1.197 1.197 ↑ 1.0 5,536 1

Seq Scan on ctgts_fl_vers "ctgtsFlVers" (cost=0.00..137.70 rows=5,570 width=12) (actual time=0.006..1.197 rows=5,536 loops=1)

13. 2.193 4,220.403 ↓ 2.0 5,619 1

Hash (cost=1,149.87..1,149.87 rows=2,827 width=8) (actual time=4,220.403..4,220.403 rows=5,619 loops=1)

  • Buckets: 8192 (originally 4096) Batches: 1 (originally 1) Memory Usage: 284kB
14. 10.020 4,218.210 ↓ 2.0 5,619 1

Hash Left Join (cost=311.41..1,149.87 rows=2,827 width=8) (actual time=3.719..4,218.210 rows=5,619 loops=1)

  • Hash Cond: ("ctsInsVers".cts_id = cts.id)
  • Filter: (SubPlan 1)
  • Rows Removed by Filter: 1475
15. 4.723 7.953 ↓ 1.3 7,094 1

Hash Right Join (cost=241.79..495.37 rows=5,655 width=12) (actual time=2.439..7.953 rows=7,094 loops=1)

  • Hash Cond: ("ctsInsScanCheck".cts_ins_id = "ctsIns".id)
16. 0.798 0.798 ↑ 1.0 5,748 1

Seq Scan on cts_ins_scans_check "ctsInsScanCheck" (cost=0.00..175.48 rows=5,748 width=32) (actual time=0.003..0.798 rows=5,748 loops=1)

17. 0.336 2.432 ↓ 1.0 2,092 1

Hash (cost=216.06..216.06 rows=2,058 width=8) (actual time=2.432..2.432 rows=2,092 loops=1)

  • Buckets: 4096 Batches: 1 Memory Usage: 114kB
18. 0.811 2.096 ↓ 1.0 2,092 1

Hash Left Join (cost=156.07..216.06 rows=2,058 width=8) (actual time=1.049..2.096 rows=2,092 loops=1)

  • Hash Cond: ("ctsInsVers".cts_ins_id = "ctsIns".id)
19. 0.246 0.246 ↓ 1.0 2,092 1

Seq Scan on cts_ins_vers "ctsInsVers" (cost=0.00..54.58 rows=2,058 width=8) (actual time=0.006..0.246 rows=2,092 loops=1)

20. 0.355 1.039 ↑ 1.0 2,092 1

Hash (cost=129.92..129.92 rows=2,092 width=20) (actual time=1.039..1.039 rows=2,092 loops=1)

  • Buckets: 4096 Batches: 1 Memory Usage: 135kB
21. 0.684 0.684 ↑ 1.0 2,092 1

Seq Scan on cts_ins "ctsIns" (cost=0.00..129.92 rows=2,092 width=20) (actual time=0.004..0.684 rows=2,092 loops=1)

22. 0.316 0.589 ↑ 1.0 2,092 1

Hash (cost=42.61..42.61 rows=2,161 width=4) (actual time=0.589..0.589 rows=2,092 loops=1)

  • Buckets: 4096 Batches: 1 Memory Usage: 106kB
23. 0.273 0.273 ↑ 1.0 2,092 1

Seq Scan on cts (cost=0.00..42.61 rows=2,161 width=4) (actual time=0.005..0.273 rows=2,092 loops=1)

24.          

SubPlan (for Hash Left Join)

25. 14.188 4,199.648 ↑ 1.5 4 7,094

Unique (cost=189.97..190.01 rows=6 width=16) (actual time=0.591..0.592 rows=4 loops=7,094)

26. 28.376 4,185.460 ↑ 2.0 4 7,094

Sort (cost=189.97..189.99 rows=8 width=16) (actual time=0.590..0.590 rows=4 loops=7,094)

  • Sort Key: "ctsInsScanCheck_1".ref_cts_ins_doc_type_id, "ctsInsScanCheck_1".check_finish_date DESC
  • Sort Method: quicksort Memory: 25kB
27. 4,157.084 4,157.084 ↑ 1.1 7 7,094

Seq Scan on cts_ins_scans_check "ctsInsScanCheck_1" (cost=0.00..189.85 rows=8 width=16) (actual time=0.301..0.586 rows=7 loops=7,094)

  • Filter: (cts_id = cts.id)
  • Rows Removed by Filter: 5741
28. 0.832 1.370 ↓ 1.0 5,535 1

Hash (cost=79.33..79.33 rows=5,433 width=8) (actual time=1.370..1.370 rows=5,535 loops=1)

  • Buckets: 8192 Batches: 1 Memory Usage: 281kB
29. 0.538 0.538 ↓ 1.0 5,535 1

Seq Scan on ctgts_fl_types_vers "ctgtsFlVers_ctgtsFlTypes" (cost=0.00..79.33 rows=5,433 width=8) (actual time=0.008..0.538 rows=5,535 loops=1)

Planning time : 1.472 ms
Execution time : 4,449.905 ms