explain.depesz.com

PostgreSQL's explain analyze made readable

Result: sbo6

Settings
# exclusive inclusive rows x rows loops node
1. 30.417 259.631 ↑ 2.1 130 1

Gather Merge (cost=48,617.75..48,649.49 rows=272 width=49) (actual time=235.264..259.631 rows=130 loops=1)

  • Workers Planned: 2
  • Workers Launched: 2
2. 0.109 229.214 ↑ 3.2 43 3 / 3

Sort (cost=47,617.73..47,618.07 rows=136 width=49) (actual time=229.211..229.214 rows=43 loops=3)

  • Sort Key: t0.device_state DESC, t1.last_updated_time DESC
  • Sort Method: quicksort Memory: 32kB
  • Worker 0: Sort Method: quicksort Memory: 30kB
  • Worker 1: Sort Method: quicksort Memory: 30kB
3. 0.181 229.105 ↑ 3.2 43 3 / 3

Nested Loop (cost=8.56..47,612.91 rows=136 width=49) (actual time=1.520..229.105 rows=43 loops=3)

4. 227.819 227.819 ↑ 3.1 22 3 / 3

Parallel Seq Scan on device_nbr t1 (cost=0.00..46,486.62 rows=68 width=45) (actual time=1.416..227.819 rows=22 loops=3)

  • Filter: (((NOT soft_delete) OR (soft_delete IS NULL)) AND ((device_info_id = 6) OR (nbr_device_info_id = 2)) AND ((customer_id = 2) OR (customer_id = '-1'::integer)))
  • Rows Removed by Filter: 740,908
5. 0.455 1.105 ↑ 1.0 2 65 / 3

Bitmap Heap Scan on device_info t0 (cost=8.56..16.54 rows=2 width=8) (actual time=0.048..0.051 rows=2 loops=65)

  • Recheck Cond: ((id = t1.device_info_id) OR (id = t1.nbr_device_info_id))
  • Filter: (((NOT soft_delete) OR (soft_delete IS NULL)) AND (id <> 388970) AND ((customer_id = 2) OR (customer_id = '-1'::integer)))
  • Heap Blocks: exact=54
6. 0.043 0.650 ↓ 0.0 0 65 / 3

BitmapOr (cost=8.56..8.56 rows=2 width=0) (actual time=0.030..0.030 rows=0 loops=65)

7. 0.173 0.173 ↑ 1.0 1 65 / 3

Bitmap Index Scan on device_info_id_index (cost=0.00..4.28 rows=1 width=0) (actual time=0.008..0.008 rows=1 loops=65)

  • Index Cond: (id = t1.device_info_id)
8. 0.433 0.433 ↑ 1.0 1 65 / 3

Bitmap Index Scan on device_info_id_index (cost=0.00..4.28 rows=1 width=0) (actual time=0.020..0.020 rows=1 loops=65)

  • Index Cond: (id = t1.nbr_device_info_id)
Planning time : 0.537 ms
Execution time : 259.718 ms