After a domain change or a plugin removal I always wonder what is still pointing at the old address. wp db search answers that by looking through every table WordPress knows, so I do not have to guess which one holds the leftover.
The basic form takes just the string:
wp db search example.com
It prints the table and column, the row ID, and a bit of text around each match (40 characters either side by default). The search is case-insensitive. Narrow it to one table by naming it after the string, or add --stats to see how many rows and columns it went through and how long it took.
For patterns there is --regex:
wp db search 'https?://' --regex --stats
A regex search is case-sensitive, and it runs per column, so anchor with ^ and $ when you want the whole value to match.
The caveat is scope. By default it only covers tables registered to $wpdb. Tables from a plugin that are not registered that way are skipped, and --all-tables-with-prefix or --all-tables widen the search at the cost of runtime and some unexpected hits. On a big database expect it to take a while. The docs show a run across about 1.36 million rows that needed roughly ten seconds.
This command only reads, so it is safe. If you plan to replace what it finds, look at wp search-replace next and use its dry run first.
Further reading: wp db search (WP-CLI handbook)