explain.depesz.com

PostgreSQL's explain analyze made readable

Result: KdEB

Settings
# exclusive inclusive rows x rows loops node
1. 198.681 1,287.574 ↑ 124,423.5 2 1

Hash Left Join (cost=11,346.96..92,893.59 rows=248,847 width=545) (actual time=327.808..1,287.574 rows=2 loops=1)

  • Hash Cond: ((molecules.rec_id)::text = (batches_1.rec_id)::text)
  • Filter: ((molecules.synonyms && '{75510f04-b7a8-4217-8118-ef09e6562663,a94e57f8-f25d-463c-aa20-887030f4c9c3}'::character varying[]) OR (batches_1.rec_id IS NOT NULL))
  • Rows Removed by Filter: 265868
2. 666.619 1,088.844 ↓ 1.1 265,870 1

Hash Right Join (cost=11,330.06..90,388.19 rows=248,847 width=449) (actual time=279.787..1,088.844 rows=265,870 loops=1)

  • Hash Cond: ((batches.rec_id)::text = (molecules.rec_id)::text)
3. 142.583 142.583 ↓ 1.0 180,317 1

Seq Scan on batches (cost=0.00..55,297.11 rows=178,911 width=407) (actual time=0.010..142.583 rows=180,317 loops=1)

4. 135.481 279.642 ↑ 1.0 248,847 1

Hash (cost=5,788.47..5,788.47 rows=248,847 width=54) (actual time=279.642..279.642 rows=248,847 loops=1)

  • Buckets: 65536 Batches: 8 Memory Usage: 3107kB
5. 144.161 144.161 ↑ 1.0 248,847 1

Seq Scan on molecules (cost=0.00..5,788.47 rows=248,847 width=54) (actual time=0.019..144.161 rows=248,847 loops=1)

6. 0.003 0.049 ↑ 1.0 2 1

Hash (cost=16.87..16.87 rows=2 width=12) (actual time=0.049..0.049 rows=2 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 9kB
7. 0.046 0.046 ↑ 1.0 2 1

Index Scan using batches_hash_key on batches batches_1 (cost=0.42..16.87 rows=2 width=12) (actual time=0.028..0.046 rows=2 loops=1)

  • Index Cond: ((hash)::text = ANY ('{75510f04-b7a8-4217-8118-ef09e6562663,a94e57f8-f25d-463c-aa20-887030f4c9c3}'::text[]))