explain.depesz.com

PostgreSQL's explain analyze made readable

Result: wrme

Settings
# exclusive inclusive rows x rows loops node
1. 0.120 3,230.625 ↓ 1.2 50 1

Limit (cost=31,539.87..31,539.98 rows=43 width=1,699) (actual time=3,230.454..3,230.625 rows=50 loops=1)

2.          

CTE infra_col_data

3. 167.011 2,409.599 ↓ 6.2 82,454 1

Unique (cost=27,189.62..27,255.95 rows=13,267 width=174) (actual time=2,137.982..2,409.599 rows=82,454 loops=1)

4. 227.679 2,242.588 ↓ 6.4 84,268 1

Sort (cost=27,189.62..27,222.79 rows=13,267 width=174) (actual time=2,137.977..2,242.588 rows=84,268 loops=1)

  • Sort Key: po_infra_instan.id_infra_instan
  • Sort Method: quicksort Memory: 20177kB
5. 180.237 2,014.909 ↓ 6.4 84,268 1

Hash Join (cost=19,837.78..26,281.12 rows=13,267 width=174) (actual time=1,125.827..2,014.909 rows=84,268 loops=1)

  • Hash Cond: (po_proj_sub_infra.id_project_sub = po_project_sub.id_project_sub)
6. 437.159 1,553.234 ↓ 1.5 84,268 1

Hash Join (cost=16,299.65..22,395.69 rows=57,236 width=166) (actual time=844.198..1,553.234 rows=84,268 loops=1)

  • Hash Cond: (po_proj_sub_infra.id_infra_instan = po_infra_instan.id_infra_instan)
7. 272.456 272.456 ↓ 1.0 274,533 1

Seq Scan on po_proj_sub_infra (cost=0.00..4,494.22 rows=274,522 width=8) (actual time=0.013..272.456 rows=274,533 loops=1)

8. 116.494 843.619 ↓ 1.5 84,771 1

Hash (cost=15,583.75..15,583.75 rows=57,272 width=162) (actual time=843.618..843.619 rows=84,771 loops=1)

  • Buckets: 131072 (originally 65536) Batches: 1 (originally 1) Memory Usage: 12693kB
9. 359.477 727.125 ↓ 1.5 84,771 1

Hash Join (cost=20.84..15,583.75 rows=57,272 width=162) (actual time=0.287..727.125 rows=84,771 loops=1)

  • Hash Cond: (po_infra_instan.id_connector_details = po_connector_details.id_connector_details)
10. 367.433 367.433 ↑ 1.0 274,442 1

Seq Scan on po_infra_instan (cost=0.00..13,960.92 rows=274,472 width=162) (actual time=0.021..367.433 rows=274,442 loops=1)

  • Filter: (NOT bl_marked_for_deletion)
  • Rows Removed by Filter: 233
11. 0.077 0.215 ↑ 1.0 53 1

Hash (cost=20.18..20.18 rows=53 width=4) (actual time=0.214..0.215 rows=53 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 10kB
12. 0.138 0.138 ↑ 1.0 53 1

Seq Scan on po_connector_details (cost=0.00..20.18 rows=53 width=4) (actual time=0.015..0.138 rows=53 loops=1)

  • Filter: (id_enterprise = 83)
  • Rows Removed by Filter: 202
13. 11.022 281.438 ↑ 2.1 9,532 1

Hash (cost=3,291.11..3,291.11 rows=19,762 width=12) (actual time=281.437..281.438 rows=9,532 loops=1)

  • Buckets: 32768 Batches: 1 Memory Usage: 666kB
14. 98.548 270.416 ↑ 2.1 9,532 1

Hash Join (cost=989.16..3,291.11 rows=19,762 width=12) (actual time=86.714..270.416 rows=9,532 loops=1)

  • Hash Cond: (po_project_sub.id_project = po_project.id_project)
15. 85.214 85.214 ↓ 1.0 85,261 1

Seq Scan on po_project_sub (cost=0.00..1,784.60 rows=85,260 width=8) (actual time=0.009..85.214 rows=85,261 loops=1)

16. 13.595 86.654 ↓ 1.8 12,498 1

Hash (cost=904.15..904.15 rows=6,801 width=8) (actual time=86.653..86.654 rows=12,498 loops=1)

  • Buckets: 16384 (originally 8192) Batches: 1 (originally 1) Memory Usage: 617kB
17. 43.178 73.059 ↓ 1.8 12,498 1

Hash Join (cost=27.69..904.15 rows=6,801 width=8) (actual time=0.804..73.059 rows=12,498 loops=1)

  • Hash Cond: (po_project.id_organization = org.id_organization)
18. 29.670 29.670 ↓ 1.0 29,343 1

Seq Scan on po_project (cost=0.00..698.42 rows=29,342 width=8) (actual time=0.007..29.670 rows=29,343 loops=1)

19. 0.082 0.211 ↑ 1.0 70 1

Hash (cost=26.81..26.81 rows=70 width=4) (actual time=0.209..0.211 rows=70 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 11kB
20. 0.129 0.129 ↑ 1.0 70 1

Index Only Scan using po_organization_pkey on po_organization org (cost=0.15..26.81 rows=70 width=4) (actual time=0.006..0.129 rows=70 loops=1)

  • Index Cond: (id_organization = ANY ('{126,133,190,191,192,193,194,195,196,197,198,199,203,204,211,272,287,288,289,290,291,292,293,331,333,337,338,339,340,341,342,347,349,350,351,352,353,354,355,356,361,362,363,366,367,368,369,373,374,375,376,377,378,379,380,381,382,383,384,385,386,396,397,398,399,400,401,402,403,424}'::integer[]))
  • Heap Fetches: 70
21. 1.849 3,230.505 ↓ 1.2 50 1

Sort (cost=4,283.92..4,284.02 rows=43 width=1,699) (actual time=3,230.451..3,230.505 rows=50 loops=1)

  • Sort Key: _req.id_import_request DESC NULLS LAST
  • Sort Method: top-N heapsort Memory: 38kB
22. 100.441 3,228.656 ↓ 22.8 980 1

Hash Join (cost=3,668.72..4,282.75 rows=43 width=1,699) (actual time=2,838.761..3,228.656 rows=980 loops=1)

  • Hash Cond: (infra_col_data.id_infra_instan = _req.id_infra_instan)
23. 2,581.743 2,581.743 ↓ 6.2 82,454 1

CTE Scan on infra_col_data (cost=0.00..265.34 rows=13,267 width=1,576) (actual time=2,137.987..2,581.743 rows=82,454 loops=1)

24. 63.135 546.472 ↓ 114.7 49,989 1

Hash (cost=3,663.27..3,663.27 rows=436 width=127) (actual time=546.470..546.472 rows=49,989 loops=1)

  • Buckets: 65536 (originally 1024) Batches: 1 (originally 1) Memory Usage: 10787kB
25. 94.830 483.337 ↓ 114.7 49,989 1

Append (cost=0.00..3,663.27 rows=436 width=127) (actual time=302.018..483.337 rows=49,989 loops=1)

26. 0.012 0.012 ↓ 0.0 0 1

Seq Scan on po_import_request_ext_copy _req (cost=0.00..0.00 rows=1 width=106) (actual time=0.010..0.012 rows=0 loops=1)

  • Filter: (((ts_status_last_updated_at)::date >= '2018-12-01'::date) AND ((ts_status_last_updated_at)::date <= '2019-01-01'::date) AND ((nu_extraction_status / 1000) = ANY ('{8,4,9,0,7}'::integer[])))
27. 87.058 388.495 ↓ 114.9 49,989 1

Bitmap Heap Scan on po_import_request_ext_copy_all _req_1 (cost=1,998.02..3,663.27 rows=435 width=127) (actual time=302.002..388.495 rows=49,989 loops=1)

  • Recheck Cond: (((ts_status_last_updated_at)::date >= '2018-12-01'::date) AND ((ts_status_last_updated_at)::date <= '2019-01-01'::date) AND ((nu_extraction_status / 1000) = ANY ('{8,4,9,0,7}'::integer[])))
  • Heap Blocks: exact=3994
28. 1.161 301.437 ↓ 0.0 0 1

BitmapAnd (cost=1,998.02..1,998.02 rows=435 width=0) (actual time=301.436..301.437 rows=0 loops=1)

29. 4.588 4.588 ↓ 2.9 49,989 1

Bitmap Index Scan on idx_po_import_request_ext_copy_all_nu_extraction_status_ts_last (cost=0.00..390.53 rows=17,410 width=0) (actual time=4.586..4.588 rows=49,989 loops=1)

  • Index Cond: (((ts_status_last_updated_at)::date >= '2018-12-01'::date) AND ((ts_status_last_updated_at)::date <= '2019-01-01'::date))
30. 295.688 295.688 ↓ 40.0 3,481,984 1

Bitmap Index Scan on idx_po_import_request_ext_copy_all_nu_extraction_status (cost=0.00..1,607.03 rows=87,050 width=0) (actual time=295.686..295.688 rows=3,481,984 loops=1)

  • Index Cond: ((nu_extraction_status / 1000) = ANY ('{8,4,9,0,7}'::integer[]))
Planning time : 1.800 ms
Execution time : 3,234.581 ms