Created
December 12, 2016 15:37
-
-
Save kshahkshah/4986726320782d5b592b7151281189cd to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
SELECT similarity(stored_value, 'my comparison value') as similarity | |
FROM all_store_values | |
ORDER BY similarity DESC, stored_value | |
LIMIT 1 | |
CREATE INDEX trgm_idx ON all_store_values USING gist (stored_value gist_trgm_ops); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment