explain.depesz.com

PostgreSQL's explain analyze made readable

Result: sJ4D : Optimization for: plan #H833

Settings

Optimization path:

Optimization(s) for this plan:

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

Finalize Aggregate (cost=33,202.93..33,202.94 rows=1 width=8) (actual time=733.887..733.887 rows=1 loops=1)

2. 67.970 733.909 ↓ 1.5 3 1

Gather (cost=33,202.72..33,202.93 rows=2 width=8) (actual time=733.874..733.909 rows=3 loops=1)

  • Workers Planned: 2
  • Workers Launched: 2
3. 1.544 665.939 ↑ 1.0 1 3

Partial Aggregate (cost=32,202.72..32,202.73 rows=1 width=8) (actual time=665.939..665.939 rows=1 loops=3)

4. 134.352 664.395 ↓ 2.8 10,410 3

Hash Left Join (cost=21,682.35..32,193.35 rows=3,748 width=8) (actual time=395.891..664.395 rows=10,410 loops=3)

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

Hash Left Join (cost=8,000.50..15,521.01 rows=47,804 width=72) (actual time=143.826..280.984 rows=49,553 loops=3)

  • Hash Cond: ((devicedata0_.eid)::text = (devicemeta7_.eid)::text)
6. 27.958 27.958 ↓ 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..27.958 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. 83.761 142.579 ↑ 1.0 170,911 3

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

  • Buckets: 65536 Batches: 8 Memory Usage: 2362kB
8. 58.818 58.818 ↑ 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.053..58.818 rows=170,911 loops=3)

9. 126.338 249.059 ↑ 1.0 148,660 3

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

  • Buckets: 65536 Batches: 8 Memory Usage: 1872kB
10. 122.721 122.721 ↑ 1.0 148,660 3

Seq Scan on t_production_device production1_ (cost=0.00..10,080.60 rows=148,660 width=67) (actual time=0.038..122.721 rows=148,660 loops=3)

Planning time : 0.796 ms
Execution time : 734.083 ms