explain.depesz.com

PostgreSQL's explain analyze made readable

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

Settings

Optimization path:

# exclusive inclusive rows x rows loops node
1. 0.003 430.792 ↓ 1.9 17 1

Limit (cost=132,099.77..132,353.29 rows=9 width=102) (actual time=430.689..430.792 rows=17 loops=1)

2. 0.000 430.789 ↓ 1.9 17 1

Nested Loop (cost=132,099.77..132,353.29 rows=9 width=102) (actual time=430.687..430.789 rows=17 loops=1)

3. 0.004 430.670 ↑ 1.0 30 1

Limit (cost=132,099.34..132,099.41 rows=30 width=74) (actual time=430.665..430.670 rows=30 loops=1)

4. 24.678 430.666 ↑ 4,853.1 30 1

Sort (cost=132,099.34..132,463.32 rows=145,594 width=74) (actual time=430.664..430.666 rows=30 loops=1)

  • Sort Key: (similarity(searchclient.searchclient_nom, 'jean'::text)) DESC
  • Sort Method: top-N heapsort Memory: 32kB
5. 382.185 405.988 ↑ 1.4 103,150 1

Bitmap Heap Scan on searchclient (cost=1,356.35..127,799.30 rows=145,594 width=74) (actual time=39.251..405.988 rows=103,150 loops=1)

  • Recheck Cond: (searchclient_meta ~~ '%JN %'::text)
  • Rows Removed by Index Recheck: 78
  • Heap Blocks: exact=55,180
6. 23.803 23.803 ↑ 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=23.802..23.803 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)