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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 19, 20262026-05-19T14:05:10+00:00 2026-05-19T14:05:10+00:00

Please ignore this question if it sounds stupid to you. I have SQL table

  • 0

Please ignore this question if it sounds stupid to you.

I have SQL table (SQL Server) for photo albums and it has 20+ columns & it will hold millions of albums.

I need to designate some albums as Promoted and some as Featured every week.
I also need a very efficient way to get these albums (page by page) when I show it to users.

How should I design this?

option 1:
I can create another table just to store the ids of the promoted and featured albums like this and then join the main albums table to get the set of columns I need.

table designated_albums:

album_id  promoted_featured
    1         1
    5         0
    7         1
    15        0

The query for promoted will return 1, 7
The query for featured will return 5, 15

Option 2:
I can add 1 column store 1 if promoted and 0 if featured. Otherwise it is null
I can then query to check for 1 in that column for promoted albums & 0 for featured.

Option 3:
I can add 2 bit columns: one for promoted (0/1) and one for featured(0/1)

Which way would perform better?

EDIT:
The design should be efficient in SQL 2008 as well. Right now I have SQL 2005.

  • 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-19T14:05:11+00:00Added an answer on May 19, 2026 at 2:05 pm

    If the albums which are promoted and/or featured are a small subset of ‘all’ albums, then you should put them in a separate table.

    If the promoted and/or featured albums are a significant proportion of the overall set then performance will be better if you add columns to your existing table.

    I’m going to assume the first case; you have ‘millions’ of albums, and I’m sure you aren’t promoting or featuring more than a few thousand, and definitely not tens of thousands. The lookup in this much smaller table will be very fast, and the join will also be fast provided that the ‘main’ table is clustered on primary key.

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

Sidebar

Related Questions

EDIT: THIS QUESTION IS INVALID SINCE THE SERVER I'M USING HAS SUDDENLY EXPIRED. PLEASE
First of all, i'm a Graphic designer so please ignore if this programming question
Please ignore code readability in this question. In terms of performance, should the following
please ignore this post, I misread algorithm, so the question is not relevant. However,
First question on SOF, please be gentle if this may be a stupid question.
I have some thread-related questions, assuming the following code. Please ignore the possible inefficiency
Please read the whole question. I'm not looking for an approach to managing multi-lingual
Please consider this example class: [Serializable] public class SomeClass { private DateTime _SomeDateTime; public
Please excuse the vague title. If anyone has a suggestion, please let me know!
This is the sequel to this question . I would like to combine three

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.