explain.depesz.com

PostgreSQL's explain analyze made readable

Result: zJiT

Settings

Optimization(s) for this plan:

# exclusive inclusive rows x rows loops node
1. 214.063 583,724.703 ↓ 3.0 3 1

HashAggregate (cost=58,553.01..58,553.02 rows=1 width=20) (actual time=583,724.702..583,724.703 rows=3 loops=1)

  • Group Key: s.lab_name
2. 474,707.754 583,510.640 ↓ 124,616.0 124,616 1

Nested Loop (cost=0.00..58,553.00 rows=1 width=20) (actual time=5.457..583,510.640 rows=124,616 loops=1)

  • Join Filter: (((measurements.record ->> 'scientist_id'::text))::bigint = s.scientist_id)
  • Rows Removed by Join Filter: 1246035384
3. 1,134.662 1,134.662 ↓ 124,616.0 124,616 1

Seq Scan on measurements (cost=0.00..58,182.00 rows=1 width=105) (actual time=0.032..1,134.662 rows=124,616 loops=1)

  • Filter: ((((record ->> 'value_1'::text))::integer = 0) AND (((record ->> 'value_2'::text))::integer = 0) AND (((record ->> 'value_3'::text))::integer = 0))
  • Rows Removed by Filter: 875384
4. 107,668.224 107,668.224 ↑ 1.0 10,000 124,616

Seq Scan on scientist_labs s (cost=0.00..171.00 rows=10,000 width=28) (actual time=0.003..0.864 rows=10,000 loops=124,616)