Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 3348658
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 18, 20262026-05-18T01:34:10+00:00 2026-05-18T01:34:10+00:00

My query looks like: SELECT * FROM dbo.TestTable TT JOIN dbo.fnListParseAndSplit(‘test,tt,zz,er,ts’,’,’) L ON TT.Name

  • 0

My query looks like:

SELECT * 
  FROM dbo.TestTable TT
  JOIN dbo.fnListParseAndSplit('test,tt,zz,er,ts',',') L ON TT.Name like '%' + L.ListMember + '%'

My issue is that on the execution plan I always get Index Seek for both cases when joining on:

  1. T.Name like ‘%’ + L.ListMember + ‘%’

  2. T.Name like L.ListMember + ‘%’.

I was of the opinion that they are completely different and when the join is like ‘%’ + L.ListMember + ‘%’ I should get an index scan.
Do I get something wrong on the execution plan? Or the SQL server 2008 is so smart that it can optimize my query?

I attached the execution plan. Do you know why do I have an index seek on the TestTabe Name column? The name column have an unique index … but in this case I would expect a scan instead of seek.

http://softrun.ro/executionplan.png

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-18T01:34:10+00:00Added an answer on May 18, 2026 at 1:34 am

    Index seek is related first part of join, if you look at the posted plan, you’ll see table scan for output of your parse function.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm running a query which looks like this SELECT parent.field, child.field FROM parent JOIN
I have a query that looks like this SELECT * from myTable WHERE Date
MY query looks like this: SELECT COUNT(entryID) FROM table WHERE date >= DATE_SUB(CURDATE(), INTERVAL
I've got a query that looks something like this: SELECT * FROM table WHERE
I have a query which looks like this: SELECT LossCost, CoverageID FROM BGILossCost] WHERE
I have a query that looks a bit like this: SELECT weekEnd, MAX(timeMonday) FROM
My SQL query looks like this... sekect * FROM mail_headers a LEFT JOIN mail_headers_body
I have a query that looks like the following: select c.[Name], c.Description, c.ID, cd.StartDateTime
I have a query that looks like the following: SELECT someString FROM ( SELECT
I’ve got a basic SQL query that looks like: SELECT TOP 1 [geom].STBuffer(500) FROM

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.