SELECT jsonb,id FROM fs09000000_mod_circulation_storage.loan WHERE lower(f_unaccent(loan.jsonb->'status'->>'name')) NOT LIKE lower(f_unaccent('Closed')) LIMIT 2147483647 OFFSET 0 Limit (cost=0.00..3328.57 rows=5964 width=959) (actual time=0.060..29.115 rows=5737 loops=1) -> Seq Scan on loan (cost=0.00..3328.57 rows=5964 width=959) (actual time=0.060..28.632 rows=5737 loops=1) Filter: (lower(fs09000000_mod_circulation_storage.f_unaccent(((jsonb -> 'status'::text) ->> 'name'::text))) !~~ 'closed'::text) Rows Removed by Filter: 2066 Planning time: 0.211 ms; Execution time: 29.355 ms; SELECT count_estimate('SELECT jsonb,id FROM fs09000000_mod_circulation_storage.loan WHERE lower(f_unaccent(loan.jsonb->''status''->>''name'')) NOT LIKE lower(f_unaccent(''Closed''))') Result (cost=0.00..0.26 rows=1 width=8) (actual time=3.053..3.054 rows=1 loops=1) Planning time: 0.014 ms; Execution time: 3.065 ms; SELECT COUNT(*) FROM fs09000000_mod_circulation_storage.loan Aggregate (cost=1270.89..1270.90 rows=1 width=8) (actual time=1.955..1.955 rows=1 loops=1) -> Seq Scan on loan (cost=0.00..1250.91 rows=7991 width=0) (actual time=0.002..1.512 rows=7803 loops=1) Planning time: 0.244 ms; Execution time: 1.976 ms SELECT jsonb,id FROM fs09000000_mod_circulation_storage.loan LIMIT 2147483647 OFFSET 0 Limit (cost=0.00..1250.91 rows=7991 width=959) (actual time=0.007..2.712 rows=7803 loops=1) -> Seq Scan on loan (cost=0.00..1250.91 rows=7991 width=959) (actual time=0.006..2.166 rows=7803 loops=1) Planning time: 0.071 ms Execution time: 3.011 ms ======================================================================================================================== SELECT jsonb,id FROM fs09000000_mod_inventory_storage.item WHERE (id='0d1564c0-b9b4-43ef-9b4d-13fa58b3da72') OR (id='14aeefaf-553c-4875-9ee2-dd3337ad0bb9') LIMIT 2147483647 OFFSET 0 Limit (cost=9.14..17.16 rows=2 width=780) (actual time=4.340..4.343 rows=2 loops=1) -> Bitmap Heap Scan on item (cost=9.14..17.16 rows=2 width=780) (actual time=4.339..4.342 rows=2 loops=1) Recheck Cond: ((id = '0d1564c0-b9b4-43ef-9b4d-13fa58b3da72'::uuid) OR (id = '14aeefaf-553c-4875-9ee2-dd3337ad0bb9'::uuid)) Heap Blocks: exact=2 -> BitmapOr (cost=9.14..9.14 rows=2 width=0) (actual time=2.370..2.370 rows=0 loops=1) -> Bitmap Index Scan on item_pkey (cost=0.00..4.57 rows=1 width=0) (actual time=1.262..1.262 rows=1 loops=1) Index Cond: (id = '0d1564c0-b9b4-43ef-9b4d-13fa58b3da72'::uuid) -> Bitmap Index Scan on item_pkey (cost=0.00..4.57 rows=1 width=0) (actual time=1.106..1.106 rows=1 loops=1) Index Cond: (id = '14aeefaf-553c-4875-9ee2-dd3337ad0bb9'::uuid) Planning time: 1.380 ms; Execution time: 4.367 ms SELECT count_estimate('SELECT jsonb,id FROM fs09000000_mod_inventory_storage.item WHERE (id=''0d1564c0-b9b4-43ef-9b4d-13fa58b3da72'') OR (id=''14aeefaf-553c-4875-9ee2-dd3337ad0bb9'')') Result (cost=0.00..0.26 rows=1 width=8) (actual time=1.048..1.048 rows=1 loops=1) Planning time: 0.012 ms; Execution time: 1.059 ms ========================================================================================================================= SELECT count_estimate('SELECT * FROM fs09000000_mod_feesfines.accounts WHERE (lower(f_unaccent(accounts.jsonb->>''loanId'')) LIKE lower(f_unaccent(''7c62dc6e-7691-4f17-b9de-0c0cb82df686''))) OR (lower(f_unaccent(accounts.jsonb->>''loanId'')) LIKE lower(f_unaccent(''381500ab-2987-4908-859c-d71b53fefd2e'')))') Result (cost=0.00..0.26 rows=1 width=8) (actual time=1.531..1.531 rows=1 loops=1) Planning time: 0.013 ms; Execution time: 1.543 ms; SELECT SELECT * FROM fs09000000_mod_feesfines.accounts WHERE (lower(f_unaccent(accounts.jsonb->>'loanId')) LIKE lower(f_unaccent('7c62dc6e-7691-4f17-b9de-0c0cb82df686'))) OR (lower(f_unaccent(accounts.jsonb->>'loanId')) LIKE lower(f_unaccent('381500ab-2987-4908-859c-d71b53fefd2e'))) Seq Scan on accounts (cost=0.00..7.25 rows=2 width=808) (actual time=0.154..0.154 rows=0 loops=1) Filter: ((lower(fs09000000_mod_feesfines.f_unaccent((jsonb ->> 'loanId'::text))) ~~ '7c62dc6e-7691-4f17-b9de-0c0cb82df686'::text) OR (lower(fs09000000_mod_feesfines.f_unaccent((jsonb ->> 'loanId'::text))) ~~ '381500ab-2987-4908-859c-d71b53fefd2e'::text)) Rows Removed by Filter: 10 Planning time: 0.230 ms Execution time: 0.167 ms