Joins on Long String

Lee Mei Wah 1 Reputation point
2022-12-21T01:42:16.553+00:00

Hi,

I'm inner joining 2 tables on a string field and the processing time is long. I'm thinking of using a unique identifier instead of a string for the join. I will need to creating a mapping table for the string and the unique identifier for both the tables. Anyone with similiar use case, pls kindly let me know detail implementation steps. And whether this is workable?

Thank you!

Developer technologies | Transact-SQL
Developer technologies | Transact-SQL
A Microsoft extension to the ANSI SQL language that includes procedural programming, local variables, and various support functions.
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. Erland Sommarskog 130.9K Reputation points MVP Volunteer Moderator
    2022-12-21T22:51:50.033+00:00

    Maybe it would be better to index the string columns? At least as a first step, before you make things complicated.

    0 comments No comments

Your answer

Answers can be marked as 'Accepted' by the question author and 'Recommended' by moderators, which helps users know the answer solved the author's problem.