explain analyze for GET /item-storage/items/d1a0aedc-a496-4982-ad60-e57882842349 folio=# explain(analyze, buffers) SELECT supertenant_mod_inventory_storage.count_estimate_smart('SELECT * FROM supertenant_mod_inventory_storage.items_mt_view WHERE lower(f_un accent(items_mt_view.jsonb->>''id'')) LIKE lower(f_unaccent(''d1a0aedc-a496-4982-ad60-e57882842349'')) ') AS count, * FROM supertenant_mod_inventory_storage.items_mt_view WHE RE lower(f_unaccent(items_mt_view.jsonb->>'id')) LIKE lower(f_unaccent('d1a0aedc-a496-4982-ad60-e57882842349')) LIMIT 1; QUERY PLAN ------------------------------------------------------------------------------------------------------------------------------------------------- Limit (cost=0.41..19.82 rows=1 width=501) (actual time=0.297..0.297 rows=1 loops=1) Buffers: shared hit=13 -> Nested Loop (cost=0.41..988085.70 rows=50904 width=501) (actual time=0.296..0.296 rows=1 loops=1) Buffers: shared hit=13 -> Seq Scan on item (cost=0.00..980547.54 rows=14544 width=465) (actual time=0.273..0.273 rows=1 loops=1) Filter: (lower(f_unaccent((jsonb ->> 'id'::text))) ~~ 'd1a0aedc-a496-4982-ad60-e57882842349'::text) Rows Removed by Filter: 101 Buffers: shared hit=11 -> Index Scan using material_type_id_idx on material_type (cost=0.41..0.48 rows=4 width=32) (actual time=0.007..0.007 rows=1 loops=1) Index Cond: (lower(f_unaccent((jsonb ->> 'id'::text))) = lower(f_unaccent((item.jsonb ->> 'materialTypeId'::text)))) Buffers: shared hit=2 Planning time: 0.682 ms Execution time: 0.314 ms (13 rows)