explain.depesz.com

PostgreSQL's explain analyze made readable

Result: l7bK

Settings
# exclusive inclusive rows x rows loops node
1. 2.162 20.487 ↓ 2.6 3,096 1

Sort (cost=1,557.58..1,560.52 rows=1,174 width=271) (actual time=20.253..20.487 rows=3,096 loops=1)

  • Sort Key: "ctsInsVers".date_create DESC
  • Sort Method: quicksort Memory: 925kB
2. 2.764 18.325 ↓ 2.6 3,096 1

Hash Join (cost=1,274.56..1,497.72 rows=1,174 width=271) (actual time=14.610..18.325 rows=3,096 loops=1)

  • Hash Cond: ("ctsInsScanCheck".cts_id = cts.id)
3. 1.007 1.007 ↑ 1.0 5,748 1

Seq Scan on cts_ins_scans_check "ctsInsScanCheck" (cost=0.00..189.85 rows=5,748 width=115) (actual time=0.007..1.007 rows=5,748 loops=1)

  • Filter: (id > 0)
4. 0.182 14.554 ↑ 1.2 359 1

Hash (cost=1,269.03..1,269.03 rows=442 width=156) (actual time=14.554..14.554 rows=359 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 76kB
5. 0.210 14.372 ↑ 1.2 359 1

Hash Join (cost=1,190.87..1,269.03 rows=442 width=156) (actual time=13.560..14.372 rows=359 loops=1)

  • Hash Cond: ("ctsInsVers".cts_id = cts.id)
6. 0.451 13.292 ↑ 1.2 359 1

Hash Join (cost=1,121.24..1,198.25 rows=442 width=99) (actual time=12.670..13.292 rows=359 loops=1)

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

Seq Scan on cts_ins_vers "ctsInsVers" (cost=0.00..64.87 rows=2,058 width=99) (actual time=0.005..0.586 rows=2,092 loops=1)

  • Filter: ((date_create >= '2019-01-01 00:00:00'::timestamp without time zone) AND (date_create < '2020-02-11 00:00:00'::timestamp without time zone))
8. 0.087 12.255 ↑ 1.3 359 1

Hash (cost=1,115.63..1,115.63 rows=449 width=8) (actual time=12.255..12.255 rows=359 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 23kB
9. 0.233 12.168 ↑ 1.3 359 1

Hash Join (cost=673.82..1,115.63 rows=449 width=8) (actual time=7.596..12.168 rows=359 loops=1)

  • Hash Cond: ("ctsIns_ctsInsStatuses".cts_ins_id = "ctsIns".id)
10. 3.137 10.781 ↓ 1.1 1,021 1

Hash Join (cost=512.89..946.84 rows=898 width=4) (actual time=5.626..10.781 rows=1,021 loops=1)

  • Hash Cond: ("ctsIns_ctsInsStatuses".cts_ins_statuses_id = "ctsInsStatuses".id)
11. 2.043 2.043 ↓ 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.006..2.043 rows=23,378 loops=1)

12. 0.215 5.601 ↓ 1.1 1,021 1

Hash (cost=501.62..501.62 rows=902 width=4) (actual time=5.601..5.601 rows=1,021 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 44kB
13. 3.084 5.386 ↓ 1.1 1,021 1

Hash Join (cost=1.34..501.62 rows=902 width=4) (actual time=0.031..5.386 rows=1,021 loops=1)

  • Hash Cond: ("ctsInsStatuses".ref_ins_statuses_id = "refInsStatuses".id)
14. 2.291 2.291 ↑ 1.0 23,378 1

Seq Scan on cts_ins_statuses "ctsInsStatuses" (cost=0.00..428.65 rows=23,465 width=8) (actual time=0.006..2.291 rows=23,378 loops=1)

15. 0.003 0.011 ↑ 1.0 1 1

Hash (cost=1.32..1.32 rows=1 width=4) (actual time=0.011..0.011 rows=1 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 9kB
16. 0.008 0.008 ↑ 1.0 1 1

Seq Scan on ref_ins_statuses "refInsStatuses" (cost=0.00..1.32 rows=1 width=4) (actual time=0.007..0.008 rows=1 loops=1)

  • Filter: ((code)::text = 'document_signed'::text)
  • Rows Removed by Filter: 25
17. 0.163 1.154 ↑ 1.3 806 1

Hash (cost=147.86..147.86 rows=1,046 width=4) (actual time=1.154..1.154 rows=806 loops=1)

  • Buckets: 2048 Batches: 1 Memory Usage: 45kB
18. 0.323 0.991 ↑ 1.3 806 1

Hash Join (cost=1.08..147.86 rows=1,046 width=4) (actual time=0.032..0.991 rows=806 loops=1)

  • Hash Cond: ("ctsIns".ref_ins_scan_check_status_id = "refInsScanCheckStatus".id)
19. 0.658 0.658 ↑ 1.0 2,092 1

Seq Scan on cts_ins "ctsIns" (cost=0.00..137.92 rows=2,092 width=8) (actual time=0.003..0.658 rows=2,092 loops=1)

20. 0.005 0.010 ↑ 1.0 2 1

Hash (cost=1.06..1.06 rows=2 width=4) (actual time=0.010..0.010 rows=2 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 9kB
21. 0.005 0.005 ↑ 1.0 2 1

Seq Scan on ref_ins_scans_check_status "refInsScanCheckStatus" (cost=0.00..1.06 rows=2 width=4) (actual time=0.004..0.005 rows=2 loops=1)

  • Filter: (((code)::text = 'new'::text) OR ((code)::text = 'half_checked'::text))
  • Rows Removed by Filter: 2
22. 0.453 0.870 ↑ 1.0 2,092 1

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

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

Seq Scan on cts (cost=0.00..42.61 rows=2,161 width=57) (actual time=0.006..0.417 rows=2,092 loops=1)

Planning time : 2.227 ms
Execution time : 20.758 ms