explain.depesz.com

PostgreSQL's explain analyze made readable

Result: Bxpj

Settings

Optimization(s) for this plan:

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

Limit (cost=2,285.39..2,293.49 rows=1 width=8) (actual time=52.813..52.876 rows=15 loops=1)

2. 0.001 52.875 ↓ 15.0 15 1

Nested Loop (cost=2,285.39..2,293.49 rows=1 width=8) (actual time=52.812..52.875 rows=15 loops=1)

3. 0.002 52.798 ↓ 19.0 19 1

Subquery Scan on rechercheclient (cost=2,284.97..2,285.03 rows=1 width=8) (actual time=52.795..52.798 rows=19 loops=1)

  • Filter: (rechercheclient.searchclient_dossier_id = 43)
4. 0.002 52.796 ↓ 4.8 19 1

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

5. 0.217 52.794 ↓ 4.8 19 1

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

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

Bitmap Heap Scan on searchclient (cost=2,032.64..2,284.93 rows=4 width=1,044) (actual time=34.205..52.577 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
7. 33.018 33.018 ↓ 206.8 13,232 1

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

  • Index Cond: ((searchclient_meta ~~ '% PRNT%'::text) AND (searchclient_meta ~~ '% P%'::text))
8. 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 = rechercheclient.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.513 ms