PostgreSQL comes with some nifty search features that go a long way and are often overlooked in favor of dedicated search systems. In short: for simple search use cases, use the LIKE operator. Optionally add a btree index for speed improvements for more complex queries, fuzzy, partial matching, use trigram based search, via the pg_trgm extension for long texts and powerful ranking and advanced…
Manual Cleanup Every so often, my e-mail inbox fills up with unread messages -- newsletters, promotions, payment confirmation and other messages I don't need. If the number is still relatively low (say 100-200), I just do a manual cleanup. I do a search using this query: is:unread category:primary , then I go through each sender, delete what I don't need and unsubscribe if necessary. To find the…