explain.depesz.com

PostgreSQL's explain analyze made readable

Result: fokM

Settings
# exclusive inclusive rows x rows loops node
1. 0.004 2,033.293 ↑ 1.0 10 1

Limit (cost=189,986.25..189,986.26 rows=10 width=63) (actual time=2,033.289..2,033.293 rows=10 loops=1)

2. 70.727 2,033.289 ↑ 25,837.9 10 1

Sort (cost=189,986.25..190,115.44 rows=258,379 width=63) (actual time=2,033.288..2,033.289 rows=10 loops=1)

  • Sort Key: ((COALESCE(entities.s_relatedness, '0'::double precision) + (CASE WHEN ((i_entities.name)::text ~~* 'M'::text) THEN length((i_entities.name)::text) ELSE 0 END)::double precision)) DESC
  • Sort Method: top-N heapsort Memory: 26kB
3. 456.222 1,962.562 ↓ 1.0 263,879 1

Hash Right Join (cost=168,348.10..188,869.56 rows=258,379 width=63) (actual time=1,232.386..1,962.562 rows=263,879 loops=1)

  • Hash Cond: ((entities.crunchbase_id)::text = (i_entities.crunchbase_id)::text)
4. 274.325 274.325 ↑ 1.0 1,176,936 1

Seq Scan on entities (cost=0.00..19,386.81 rows=1,176,936 width=43) (actual time=0.024..274.325 rows=1,176,936 loops=1)

5. 110.352 1,232.015 ↓ 1.0 263,879 1

Hash (cost=167,443.77..167,443.77 rows=258,379 width=36) (actual time=1,232.015..1,232.015 rows=263,879 loops=1)

  • Buckets: 524288 (originally 262144) Batches: 1 (originally 1) Memory Usage: 22681kB
6. 1,067.813 1,121.663 ↓ 1.0 263,879 1

Bitmap Heap Scan on i_entities (cost=1,486.49..167,443.77 rows=258,379 width=36) (actual time=84.482..1,121.663 rows=263,879 loops=1)

  • Recheck Cond: ((' '::text || (name)::text) ~~* '% m%'::text)
  • Rows Removed by Index Recheck: 3469
  • Heap Blocks: exact=130477
7. 53.850 53.850 ↓ 1.1 277,851 1

Bitmap Index Scan on i_entities_name_trigrams (cost=0.00..1,473.57 rows=258,379 width=0) (actual time=53.850..53.850 rows=277,851 loops=1)

  • Index Cond: ((' '::text || (name)::text) ~~* '% m%'::text)