explain.depesz.com

PostgreSQL's explain analyze made readable

Result: UlmI

Settings
# exclusive inclusive rows x rows loops node
1. 0.113 51,069.988 ↑ 1.0 50 1

Limit (cost=412,474.05..412,474.18 rows=50 width=1,679) (actual time=51,069.826..51,069.988 rows=50 loops=1)

2.          

CTE infra_col_data

3. 195.921 2,452.787 ↓ 6.2 82,454 1

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

4. 249.268 2,256.866 ↓ 6.4 84,268 1

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

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

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

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

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

  • Hash Cond: (po_proj_sub_infra.id_infra_instan = po_infra_instan.id_infra_instan)
7. 275.072 275.072 ↓ 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..275.072 rows=274,533 loops=1)

8. 113.960 845.524 ↓ 1.5 84,771 1

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

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

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

  • Hash Cond: (po_infra_instan.id_connector_details = po_connector_details.id_connector_details)
10. 371.077 371.077 ↑ 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.017..371.077 rows=274,442 loops=1)

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

Hash (cost=20.18..20.18 rows=53 width=4) (actual time=0.262..0.263 rows=53 loops=1)

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

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

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

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

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

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

  • Hash Cond: (po_project_sub.id_project = po_project.id_project)
15. 92.204 92.204 ↓ 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.019..92.204 rows=85,261 loops=1)

16. 14.584 94.560 ↓ 1.8 12,498 1

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

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

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

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

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

19. 0.109 0.269 ↑ 1.0 70 1

Hash (cost=26.81..26.81 rows=70 width=4) (actual time=0.268..0.269 rows=70 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 11kB
20. 0.160 0.160 ↑ 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.013..0.160 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. 3.943 51,069.875 ↑ 5,345.3 50 1

Sort (cost=385,218.10..385,886.26 rows=267,264 width=1,679) (actual time=51,069.823..51,069.875 rows=50 loops=1)

  • Sort Key: _req.id_import_request DESC NULLS LAST
  • Sort Method: top-N heapsort Memory: 38kB
22. 174.710 51,065.932 ↑ 136.5 1,958 1

Nested Loop (cost=0.57..376,339.78 rows=267,264 width=1,679) (actual time=45,877.742..51,065.932 rows=1,958 loops=1)

23. 2,655.632 2,655.632 ↓ 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,129.238..2,655.632 rows=82,454 loops=1)

24. 412.270 48,235.590 ↓ 0.0 0 82,454

Append (cost=0.57..28.32 rows=3 width=107) (actual time=0.584..0.585 rows=0 loops=82,454)

25. 47,246.142 47,246.142 ↓ 0.0 0 82,454

Index Scan using idx_po_import_request_ext_copy_ts_status_last_updated_at_infra on po_import_request_ext_copy _req (cost=0.57..15.60 rows=1 width=106) (actual time=0.573..0.573 rows=0 loops=82,454)

  • Index Cond: ((id_infra_instan = infra_col_data.id_infra_instan) AND ((ts_status_last_updated_at)::date >= '2018-12-01'::date) AND ((ts_status_last_updated_at)::date <= '2019-01-01'::date))
  • Filter: ((nu_extraction_status / 1000) = ANY ('{8,9}'::integer[]))
  • Rows Removed by Filter: 17
26. 329.816 329.816 ↓ 0.0 0 82,454

Index Scan using idx_po_import_request_ext_copy_8_ts_status_last_updated_at_infr on po_import_request_ext_copy_8 _req_1 (cost=0.43..7.01 rows=1 width=148) (actual time=0.004..0.004 rows=0 loops=82,454)

  • Index Cond: ((id_infra_instan = infra_col_data.id_infra_instan) AND ((ts_status_last_updated_at)::date >= '2018-12-01'::date) AND ((ts_status_last_updated_at)::date <= '2019-01-01'::date))
  • Filter: ((nu_extraction_status / 1000) = ANY ('{8,9}'::integer[]))
27. 247.362 247.362 ↓ 0.0 0 82,454

Index Scan using idx_po_import_request_ext_copy_9_ts_status_last_updated_at_infr on po_import_request_ext_copy_9 _req_2 (cost=0.28..5.70 rows=1 width=159) (actual time=0.003..0.003 rows=0 loops=82,454)

  • Index Cond: ((id_infra_instan = infra_col_data.id_infra_instan) AND ((ts_status_last_updated_at)::date >= '2018-12-01'::date) AND ((ts_status_last_updated_at)::date <= '2019-01-01'::date))
  • Filter: ((nu_extraction_status / 1000) = ANY ('{8,9}'::integer[]))
Planning time : 3.026 ms
Execution time : 51,075.811 ms