explain.depesz.com

PostgreSQL's explain analyze made readable

Result: uZNK : Optimization for: Optimization for: plan #H833; plan #sJ4D

Settings

Optimization path:

# exclusive inclusive rows x rows loops node
1. 0.000 813.234 ↑ 1.0 1 1

Finalize Aggregate (cost=31,376.93..31,376.94 rows=1 width=8) (actual time=813.234..813.234 rows=1 loops=1)

2. 90.600 813.269 ↓ 1.5 3 1

Gather (cost=31,376.72..31,376.93 rows=2 width=8) (actual time=813.215..813.269 rows=3 loops=1)

  • Workers Planned: 2
  • Workers Launched: 2
3. 1.601 722.669 ↑ 1.0 1 3

Partial Aggregate (cost=30,376.72..30,376.73 rows=1 width=8) (actual time=722.669..722.669 rows=1 loops=3)

4. 130.619 721.068 ↓ 2.8 10,410 3

Hash Left Join (cost=20,956.35..30,367.35 rows=3,748 width=8) (actual time=429.671..721.068 rows=10,410 loops=3)

  • Hash Cond: (devicedata0_.production_device_id = production1_.id)
  • Filter: ((lower((devicemeta7_.device_name)::text) ~~ '%218%'::text) OR (lower((production1_.serial_number)::text) ~~ '%218%'::text))
  • Rows Removed by Filter: 39143
5. 127.212 332.584 ↓ 1.0 49,553 3

Hash Left Join (cost=8,000.50..15,521.01 rows=47,804 width=35) (actual time=170.894..332.584 rows=49,553 loops=3)

  • Hash Cond: ((devicedata0_.eid)::text = (devicemeta7_.eid)::text)
6. 35.184 35.184 ↓ 1.0 49,553 3

Parallel Seq Scan on t_device devicedata0_ (cost=0.00..4,417.03 rows=47,804 width=86) (actual time=0.016..35.184 rows=49,553 loops=3)

  • Filter: ((next IS NULL) AND ((registration_time IS NOT NULL) OR (registration_time IS NULL)))
  • Rows Removed by Filter: 7969
7. 109.545 170.188 ↑ 1.0 170,911 3

Hash (cost=4,194.11..4,194.11 rows=170,911 width=56) (actual time=170.188..170.188 rows=170,911 loops=3)

  • Buckets: 65536 Batches: 8 Memory Usage: 2362kB
8. 60.643 60.643 ↑ 1.0 170,911 3

Seq Scan on t_device_metadata devicemeta7_ (cost=0.00..4,194.11 rows=170,911 width=56) (actual time=0.054..60.643 rows=170,911 loops=3)

9. 84.929 257.865 ↑ 1.0 148,660 3

Hash (cost=10,080.60..10,080.60 rows=148,660 width=28) (actual time=257.865..257.865 rows=148,660 loops=3)

  • Buckets: 65536 Batches: 4 Memory Usage: 2707kB
10. 172.936 172.936 ↑ 1.0 148,660 3

Seq Scan on t_production_device production1_ (cost=0.00..10,080.60 rows=148,660 width=28) (actual time=0.091..172.936 rows=148,660 loops=3)

Planning time : 0.698 ms
Execution time : 813.351 ms