3 ms·
Last time I needed this, LIKE queries still did sequential scans anyway, so the presence of an index or not did not matter. Also note that you can have multipl
by necovek 4y ago
Last time I needed this, LIKE queries still did sequential scans anyway, so the presence of an index or not did not matter.
Also note that you can have multiple indexes in Postgres (well, any RDBMS).
For emails in particular, you can even do partial indexes (eg. imagine filtering emails on @gmail.com to hit a separate index that's only half of your full table index). This requires some care with queries, but a wonderful feature regardless.
- tpetry 4y agoWith a trigram index in PostgreSQL you can even do index-supported leading wildcard searches.