Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/mhmd-azeez/pgtrgm
Using pg_trgm for string similarity search and speeding up LIKE operator
https://github.com/mhmd-azeez/pgtrgm
fuzzy-search pg-trgm postgresql string-similarity
Last synced: 15 days ago
JSON representation
Using pg_trgm for string similarity search and speeding up LIKE operator
- Host: GitHub
- URL: https://github.com/mhmd-azeez/pgtrgm
- Owner: mhmd-azeez
- Created: 2021-05-11T20:54:00.000Z (over 3 years ago)
- Default Branch: master
- Last Pushed: 2021-05-11T20:54:27.000Z (over 3 years ago)
- Last Synced: 2024-11-30T00:29:11.924Z (23 days ago)
- Topics: fuzzy-search, pg-trgm, postgresql, string-similarity
- Language: C#
- Homepage: https://mazeez.dev/posts/pg-trgm-similarity-search-and-fast-like
- Size: 71.9 MB
- Stars: 4
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
## `pg_trgm` test
The database dump and benchmark and fake data generation code for [this blog post](https://mazeez.dev/posts/pg-trgm-similarity-search-and-fast-like).
### How to restore the database dump:
**Note:** This dump doesn't have the `gin` index on the name columns.
1. Extract the dump file from [name_search_no_index.7z](./name_search_no_index.7z).
2. Then create an empty database:
```
createdb -U postgres name_search_index --template=template0
```3. Then restore the dump file into the empty database:
```
pg_restore -U postgres -d name_search_index < name_search_no_index.dump
```For more info please take a look [at this article](https://mazeez.dev/posts/backup-and-restore-in-postgres).