explain.depesz.com

PostgreSQL's explain analyze made readable

Result: LKnS : Optimization for: Optimization for: plan #4gt; plan #B3eC

Settings

Optimization path:

Optimization(s) for this plan:

# exclusive inclusive rows x rows loops node
1. 0.006 301.941 ↓ 3.3 30 1

Limit (cost=130,103.82..130,357.34 rows=9 width=102) (actual time=301.807..301.941 rows=30 loops=1)

2. 0.025 301.935 ↓ 3.3 30 1

Nested Loop (cost=130,103.82..130,357.34 rows=9 width=102) (actual time=301.806..301.935 rows=30 loops=1)

3. 0.002 301.790 ↑ 1.0 30 1

Limit (cost=130,103.39..130,103.47 rows=30 width=70) (actual time=301.787..301.790 rows=30 loops=1)

4. 13.106 301.788 ↑ 2,416.5 30 1

Sort (cost=130,103.39..130,284.63 rows=72,496 width=70) (actual time=301.786..301.788 rows=30 loops=1)

  • Sort Key: (similarity(searchclient.searchclient_nom, 'jean'::text)) DESC
  • Sort Method: top-N heapsort Memory: 32kB
5. 259.078 288.682 ↑ 1.4 53,080 1

Bitmap Heap Scan on searchclient (cost=1,338.08..127,962.26 rows=72,496 width=70) (actual time=44.457..288.682 rows=53,080 loops=1)

  • Recheck Cond: (searchclient_meta ~~ '%JN %'::text)
  • Rows Removed by Index Recheck: 78
  • Filter: (searchclient_dossier_id = 15)
  • Rows Removed by Filter: 50,070
  • Heap Blocks: exact=55,180
6. 29.604 29.604 ↑ 1.4 103,228 1

Bitmap Index Scan on searchclient_meta_sp (cost=0.00..1,319.96 rows=145,594 width=0) (actual time=29.603..29.604 rows=103,228 loops=1)

  • Index Cond: (searchclient_meta ~~ '%JN %'::text)
7. 0.120 0.120 ↑ 1.0 1 30

Index Scan using client_dossierid_sk on client (cost=0.43..8.45 rows=1 width=4) (actual time=0.004..0.004 rows=1 loops=30)

  • Index Cond: ((client_dossier_id = 15) AND (client_id = searchclient.searchclient_client_id))
  • Filter: (client_etat = 0)