Signs You Need To Rethink Your Schema

To The Point

If you need to search for:

  • Leading wildcards
  • Substrings
  • Charindexes
  • Patindexes
  • Replaces
  • Lefts
  • Rights
  • Concats
  • Any combination of TRIMs
  • Columns with prefixed values
  • Columns with suffixed values
  • Concatenated columns
  • String split columns

Something is broken in the way that you store data.

You’re overloading things, and you’re going to hit big performance problems when your database grows past puberty.

Thanks for reading!

3 thoughts on “Signs You Need To Rethink Your Schema

  1. Hi Erik!

    Based on your experience, what would you recommend for someone that’s trying to deal with those nasty leading wildcards, besides wine and whiskey? Trigrams? Full-Text? or something out of SQL Server like Elastic Search?


    1. I’d much rather people aim for properly normalized schema first, but…
      * Trigrams can be a bear to maintain (I’ve seen the articles)
      * Full text search sucks
      * Elasticsearch can be worthwhile if developers are savvy enough


Leave a Reply

Your email address will not be published. Required fields are marked *