explain.depesz.com

PostgreSQL's explain analyze made readable

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

Settings

Optimization path:

# exclusive inclusive rows x rows loops node
1. 0.007 54.911 ↓ 3.3 30 1

Limit (cost=1,136.89..1,390.41 rows=9 width=102) (actual time=54.600..54.911 rows=30 loops=1)

2. 0.012 54.904 ↓ 3.3 30 1

Nested Loop (cost=1,136.89..1,390.41 rows=9 width=102) (actual time=54.599..54.904 rows=30 loops=1)

3. 0.004 54.562 ↑ 1.0 30 1

Limit (cost=1,136.46..1,136.53 rows=30 width=70) (actual time=54.556..54.562 rows=30 loops=1)

4. 1.606 54.558 ↑ 4.8 30 1

Sort (cost=1,136.46..1,136.82 rows=144 width=70) (actual time=54.555..54.558 rows=30 loops=1)

  • Sort Key: (similarity(searchclient.searchclient_nom, 'malika'::text)) DESC
  • Sort Method: top-N heapsort Memory: 30kB
5. 50.751 52.952 ↓ 21.0 3,024 1

Bitmap Heap Scan on searchclient (cost=18.20..1,132.20 rows=144 width=70) (actual time=3.340..52.952 rows=3,024 loops=1)

  • Recheck Cond: (searchclient_meta ~~ '%MLK%'::text)
  • Rows Removed by Index Recheck: 4
  • Filter: (searchclient_dossier_id = 15)
  • Rows Removed by Filter: 2,945
  • Heap Blocks: exact=4,684
6. 2.201 2.201 ↓ 20.7 5,973 1

Bitmap Index Scan on searchclient_meta_sp (cost=0.00..18.16 rows=288 width=0) (actual time=2.201..2.201 rows=5,973 loops=1)

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

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

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