August 3, 2020 at 12:54 pm
Just as a side note, depending on how often your columns are updated/modified, you can always split the string ahead of time using a permanent tally table like this:
Agreed. I said similar in this post from above...
https://www.sqlservercentral.com/forums/topic/string-compare-again#post-3776562
Note the execution plan
It would be helpful if you just posted the execution plan and tell us what we're supposed to take note of. 😀
--Jeff Moden
Change is inevitable... Change for the better is not.
August 3, 2020 at 6:38 pm
Alan Burstein wrote:Just as a side note, depending on how often your columns are updated/modified, you can always split the string ahead of time using a permanent tally table like this:
Agreed. I said similar in this post from above...
https://www.sqlservercentral.com/forums/topic/string-compare-again#post-3776562
Alan Burstein wrote:Note the execution plan
It would be helpful if you just posted the execution plan and tell us what we're supposed to take note of. 😀
Just fixed it. Added a couple plans. Also re-added the unique clustered index for the Indexed view which was missed copying/pasting.
-- Itzik Ben-Gan 2001
August 3, 2020 at 6:46 pm
Agreed. I said similar in this post from above...
I missed this.
The difference is that I did the split using an indexed view. This way the split only happens once, then once more, as needed, when the a new string is added to the strHold table. I don't think people take advantage of "pre-splitting" strings for stuff like this where the same string is split each time the contents need to be read.
Tally tables + Indexed Views - a very fun topic. 🙂
-- Itzik Ben-Gan 2001
August 25, 2020 at 12:26 am
Jeff Moden wrote:Agreed. I said similar in this post from above...
I missed this.
The difference is that I did the split using an indexed view. This way the split only happens once, then once more, as needed, when the a new string is added to the strHold table. I don't think people take advantage of "pre-splitting" strings for stuff like this where the same string is split each time the contents need to be read.
Tally tables + Indexed Views - a very fun topic. 🙂
That's actually an awesome idea. I can also see an application for what I call "poor-man's Full Text" for full name and address lookups. Great idea Alan.
--Jeff Moden
Change is inevitable... Change for the better is not.
Viewing 4 posts - 16 through 18 (of 18 total)
You must be logged in to reply to this topic. Login to reply