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 7034639
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 28, 20262026-05-28T01:12:38+00:00 2026-05-28T01:12:38+00:00

I have a table with around 15 columns which can be queried with different

  • 0

I have a table with around 15 columns which can be queried with different combination. The table columns for instance is UserID, LocationID, DepartmentID, CoOrdinate1, CoOrdinate2, CoOrdinate3…CoOrdinate15.

To speed up the retrieval of combination of data we have created a Computed field where we are storing the values of these columns in the format :UserID::LocationID::DepartmentID::CoOrdinate1:…:CoOrdinate15: – a sample value would look like :1:100:20:22:39:94:29:..:9:

While this is fine for retrieving data where the index key matches (= operator) we are exploring the best method to fetch combinations.

For instance if the user queries for UserID = 1 and CoOrdinate = 15 we plan to build a Like condition ‘%:1::%::%::%::%::%::%::%::%::15:%’.

SQL Server is doing an Index Scan to retrieve the data. From a performance point of view – is there a better way to approach this problem.

  • 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-28T01:12:38+00:00Added an answer on May 28, 2026 at 1:12 am

    let me sum this up:

    • when query a table, in your where clause you can have an arbitrary combination of the columns
    • you could create an individual index on each column, but only one of them would be used for your query, as normal b-tree indexes cannot be combined
    • you could create composite indexes on certain combination of columns but these indexes would only be used by those queries that have a where clause that matches the columns in the composite index; also, having many wide composite indexes would incur big maintenance overhead
    • Since you want to filter against arbitrary combination of the columns in your queries, composite indexes are not an option: you cannot create a composite index for all possible combination of columns

    In general, the solution to this problem is having bitmap indexes on each columns, because bitmap indexes can be combined. Unfortunately SQL Server does not support bitmap indexes but I’ve heard it has some similar feature. I suggest you look into that:

    http://msdn.microsoft.com/en-us/library/bb522541.aspx
    (This article discuss the usage of bitmap indexes when joining tables, but dont let that confuse you, they can be useful in your use case as well, when you query a single table.)

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

Sidebar

Related Questions

I have a really large table (around 32 columns and 1000+ rows) which I'm
Here we go... I have a table (which unfortunately I can't change) with columns
I have a database with a table with 18 columns, the second of which
I have a html table which consists of columns for days, and rows for
Id columns can specify a generator. Perfect. However, I have a situation in which
we have a database table which has around 200,000 records. which includes 3 ntext
I have a table in Excel which has the columns: Date Person Name Amount
Just a small question regarding joins. I have a table with around 30 fields
I'm having an issue bending my head around this one. I have a table
I have table with 3 columns A B C. I want to select *

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.