explain.depesz.com

PostgreSQL's explain analyze made readable

Result: Hfke : q2

Settings
# exclusive inclusive rows x rows loops node
1. 10,108.972 92,788.298 ↓ 1.0 7,579,436 1

WindowAgg (cost=2,841,440.89..3,049,525.03 rows=7,566,696 width=176) (actual time=79,517.873..92,788.298 rows=7,579,436 loops=1)

2. 67,305.815 82,679.326 ↓ 1.0 7,579,436 1

Sort (cost=2,841,440.89..2,860,357.63 rows=7,566,696 width=134) (actual time=79,517.820..82,679.326 rows=7,579,436 loops=1)

  • Sort Key: w."SHIPMENT_ID", w."LASERMARK
  • Sort Method: external merge Disk: 1181816kB
3. 4,739.590 15,373.511 ↓ 1.0 7,579,436 1

Hash Join (cost=7,094.83..425,125.26 rows=7,566,696 width=134) (actual time=41.353..15,373.511 rows=7,579,436 loops=1)

  • Hash Cond: (w."SHIPMENT_ID" = s."SHIPMENT_ID")
4. 4,353.206 10,617.566 ↑ 1.0 7,529,986 1

Hash Join (cost=2,937.97..317,033.19 rows=7,538,199 width=84) (actual time=24.978..10,617.566 rows=7,529,986 loops=1)

  • Hash Cond: (w."PARAMETER_ID" = p."PARAMETER_ID")
5. 6,239.494 6,239.494 ↑ 1.0 7,529,986 1

Append (cost=0.00..210,444.98 rows=7,538,199 width=55) (actual time=0.036..6,239.494 rows=7,529,986 loops=1)

  • -> Seq Scan on wafer_data_20190401_20190501 w (cost=0.00..137138.15 rows=4910877 width=55) (actual time=0.035..2157.216 rows=4906673 loops=
  • Filter: (("SHIPMENT_DATE" >= '2019-04-01 00:00:00'::timestamp without time zone) AND ("SHIPMENT_DATE" <= '2019-06-30 00:00:00'::timesta
  • -> Seq Scan on wafer_data_20190501_20190601 w_1 (cost=0.00..73306.83 rows=2627322 width=54) (actual time=0.009..1060.357 rows=2623313 loops
  • Filter: (("SHIPMENT_DATE" >= '2019-04-01 00:00:00'::timestamp without time zone) AND ("SHIPMENT_DATE" <= '2019-06-30 00:00:00'::timesta
6. 12.856 24.866 ↑ 1.0 33,021 1

Hash (cost=2,525.21..2,525.21 rows=33,021 width=33) (actual time=24.866..24.866 rows=33,021 loops=1)

  • Buckets: 65536 Batches: 1 Memory Usage: 2627kB
7. 12.010 12.010 ↑ 1.0 33,021 1

Seq Scan on parameters p (cost=0.00..2,525.21 rows=33,021 width=33) (actual time=0.006..12.010 rows=33,021 loops=1)

8. 2.552 16.355 ↑ 1.0 5,576 1

Hash (cost=4,087.16..4,087.16 rows=5,576 width=58) (actual time=16.355..16.355 rows=5,576 loops=1)

  • Buckets: 8192 Batches: 1 Memory Usage: 573kB
9. 3.053 13.803 ↑ 1.0 5,576 1

Hash Join (cost=3,654.35..4,087.16 rows=5,576 width=58) (actual time=5.735..13.803 rows=5,576 loops=1)

  • Hash Cond: (sp."PC_ID" = pc."PC_ID")
10. 5.049 9.605 ↑ 1.0 5,576 1

Hash Join (cost=1,953.27..2,309.41 rows=5,576 width=38) (actual time=4.584..9.605 rows=5,576 loops=1)

  • Hash Cond: (sp."SHIPMENT_ID" = s."SHIPMENT_ID")
  • -> Index Only Scan using shipmentpc_idx1 on shipment_pc sp (cost=0.28..341.78 rows=5576 width=8) (actual time=0.015..1.899 rows=5576
  • Heap Fetches: 1548
11. 1.810 4.556 ↑ 1.0 5,555 1

Hash (cost=1,883.55..1,883.55 rows=5,555 width=30) (actual time=4.556..4.556 rows=5,555 loops=1)

  • Buckets: 8192 Batches: 1 Memory Usage: 418kB
12. 2.746 2.746 ↑ 1.0 5,555 1

Seq Scan on shipment s (cost=0.00..1,883.55 rows=5,555 width=30) (actual time=0.003..2.746 rows=5,555 loops=1)

13. 0.103 1.145 ↑ 1.0 270 1

Hash (cost=1,697.70..1,697.70 rows=270 width=28) (actual time=1.145..1.145 rows=270 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 25kB
14. 1.042 1.042 ↑ 1.0 270 1

Seq Scan on pc (cost=0.00..1,697.70 rows=270 width=28) (actual time=0.005..1.042 rows=270 loops=1)

Planning time : 2.386 ms
Execution time : 94,758.515 ms