explain.depesz.com

PostgreSQL's explain analyze made readable

Result: lT8G : Optimization for: plan #Bxpj

Settings

Optimization path:

# exclusive inclusive rows x rows loops node
1. 0.001 44.287 ↓ 15.0 15 1

Limit (cost=2,285.39..2,318.88 rows=1 width=8) (actual time=44.230..44.287 rows=15 loops=1)

2. 0.000 44.286 ↓ 15.0 15 1

Nested Loop (cost=2,285.39..2,318.88 rows=1 width=8) (actual time=44.230..44.286 rows=15 loops=1)

3. 0.002 44.212 ↓ 4.8 19 1

Limit (cost=2,284.97..2,284.98 rows=4 width=1,044) (actual time=44.210..44.212 rows=19 loops=1)

4. 0.114 44.210 ↓ 4.8 19 1

Sort (cost=2,284.97..2,284.98 rows=4 width=1,044) (actual time=44.209..44.210 rows=19 loops=1)

  • Sort Key: (similarity(searchclient.searchclient_nom, 'bernet p'::text)) DESC
  • Sort Method: top-N heapsort Memory: 27kB
5. 14.374 44.096 ↓ 198.0 792 1

Bitmap Heap Scan on searchclient (cost=2,032.64..2,284.93 rows=4 width=1,044) (actual time=30.919..44.096 rows=792 loops=1)

  • Recheck Cond: ((searchclient_meta ~~ '% PRNT%'::text) AND (searchclient_meta ~~ '% P%'::text))
  • Rows Removed by Index Recheck: 2350
  • Filter: (searchclient_dossier_id = 43)
  • Rows Removed by Filter: 9868
  • Heap Blocks: exact=10492
6. 29.722 29.722 ↓ 206.8 13,232 1

Bitmap Index Scan on searchclient_meta_sp (cost=0.00..2,032.64 rows=64 width=0) (actual time=29.722..29.722 rows=13,232 loops=1)

  • Index Cond: ((searchclient_meta ~~ '% PRNT%'::text) AND (searchclient_meta ~~ '% P%'::text))
7. 0.076 0.076 ↑ 1.0 1 19

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

  • Index Cond: ((client_dossier_id = 43) AND (client_id = searchclient.searchclient_client_id))
  • Filter: ((client_etat = 0) AND (client_idechange <> ALL ('{40024844,3464799,4039958,5731075,23737408,3513338,9081799,8329786,3477463,5714470,4667346,1039789}'::integer[])))
  • Rows Removed by Filter: 0
Planning time : 0.393 ms