79531130

Date: 2025-03-24 12:56:29
Score: 3
Natty:
Report link

I’m still learning best practices for MySQL and I’d really appreciate any guidance from more experienced developers

To make free-text search a bit simpler (without heavy JOINs), I’m thinking of creating a column (e.g., search_text) that concatenates fields like first name, last name, etc., and then running a LIKE '%keyword%' query on it.

search_text = 'John Smith, Smith John, John_Smith, John-Smith, John/Smith, John, Smith'

I understand this may not follow proper normalization, and some may consider it a bad practice.
But I was wondering…

Questions:
1. Is this approach ever considered acceptable in practice, especially for smaller datasets (~100k–1M rows)?
2. Does it actually help performance in some cases, compared to multiple JOINs?
3. Is there a better way to handle simple free-text search in MySQL without moving to full-text search or external tools?

After running the search, I still need to JOIN by ID to fetch full records, so I’m not sure if this actually saves performance or ends up being the same.
I’d love to hear any real-world experience, pros/cons, or advice on this approach. Thank you so much!

Reasons:
  • Blacklisted phrase (0.5): Thank you
  • Blacklisted phrase (2): was wondering
  • Long answer (-1):
  • Has code block (-0.5):
  • Contains question mark (0.5):
  • Self-answer (0.5):
  • Low reputation (1):
Posted by: Fujiwara Takumi