News for hackers. Stuff that matters.
Re:The state of full text search in PostgreSQL 12 by cies on Monday February 03, 2020 @03:33PM (#22228678)
> If you use a function like this, [each query] it will need to be run for every entry
Re:The state of full text search in PostgreSQL 12 by rzwitserloot on Monday February 03, 2020 @04:12PM (#22229169)
No; if you create an index for the item: `insensitiveQuery(some_table.name)` and you then attempt to run: `SELECT * FROM some_table WHERE insensitiveQuery(name) LIKE insensitiveQuery('Étranger');`, the engine would run the `insensitiveQuery` function on the string `'Étranger'`, and then look up that result in the index directly, which is O(nlogn) or faster. If you have a million tables, that'd run the function only once (on `Étranger`) and do about 20 lookups in the index before finding you the qualifying row(s).
Re:The state of full text search in PostgreSQL 12 by cies on Wednesday February 05, 2020 @03:06AM (#22244879)
Cheer. I did not get the index-on-a-derived-value bit.