What would perform better on a big table ~30million records grouped into 100_000 indexed buckets each having between 1 to 10_000 records?
- MySQL's full text index on the entire dataset (presumably there is no way to narrow it down as cannot combine traditional indices with full text indices)
OR
- postgresql's levenshtein distance calculated on pre-indexed data?
Would calculating the distance for 10_000 records consume a lot IO or is it an insignificant amount of data? Everyone warns about using this on big data sets but how big is too big in this context?
i.e. pseudo code queries with:
where indexed_bucket_id = "id12345678"
AND text_field fuzzy matches 'input string'
pg_trgm
and the%
operator with a GIN index.=
delivers more or fewer rows than the text match.