Re: Custom Operator for citext LIKE predicates question

2022-01-13 Thread Efrain J. Berdecia
Good points. At least on the limited testing we did, we were able to get the same answer back with both executions; at least for the use cases we tested.  We are still doing more thourough testing. This is an application that is been ported from MS SQL server to postgres and apparently the migrat

Re: Custom Operator for citext LIKE predicates question

2022-01-13 Thread Tom Lane
"Efrain J. Berdecia" writes: > In our setup it has actually worked per the explains provided making the > query run in milliseconds instead of seconds. To me, "work" includes "get the right answer". I do not think you are getting the same answers that citext would normally provide. If you don't

Re: Custom Operator for citext LIKE predicates question

2022-01-13 Thread Efrain J. Berdecia
Thank you for the feedback. In our setup it has actually worked per the explains provided making the query run in milliseconds instead of seconds. We weren't sure if this should be something that could be added natively with future Postgres deployments. Thanks,Efrain J. Berdecia On Thursday

Re: Custom Operator for citext LIKE predicates question

2022-01-12 Thread Tom Lane
"Efrain J. Berdecia" writes: > After attempting to use gin and gist indexes for our queries that run against > citext columns, our team has come up with the following to make our queries > run from 2 mins to 25ms;CREATE EXTENSION pg_trgmCREATE EXTENSION btree_gin > --may not be needed, checking

Custom Operator for citext LIKE predicates question

2022-01-12 Thread Efrain J. Berdecia
After attempting to use gin and gist indexes for our queries that run against citext columns, our team has come up with the following to make our queries run from 2 mins to 25ms;CREATE EXTENSION pg_trgmCREATE EXTENSION btree_gin --may not be needed, checking CREATE OPERATOR CLASS gin_trgm_ops_ci