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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 20, 20262026-05-20T04:02:42+00:00 2026-05-20T04:02:42+00:00

Imagine you have a blog post that users can subscrive to comments Is is

  • 0

Imagine you have a blog post that users can subscrive to comments
Is is faster to search on a table dedicated to manage subscriptions like:
ID, Post, User

or is it faster to have a field in the users table with their subcritions:
Subscriptions=|2|4|18|21|33|

or is it faster to have a field in the post table with the users that subscrive to that post:
Users_subscrive=|1|2|4|6|9|

  • 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-20T04:02:42+00:00Added an answer on May 20, 2026 at 4:02 am

    It’s better to have a separate table Subscriptions, with ID, Post, User.

    (assuming ID the autoincrement PK of that table, Post a FK to a table Posts, User a FK to a table Users)

    Both from a logical point of view (a subscription is its own entity, thus its own table) as for database performance, a separate table is the way to go.

    This is a process called normalization, it will allow you to make joins, and perform complex queries, like “Give me the last 5 users that have subscribed to this post” or “get all posts for this user which have changed since his last visit“.

    It also does not restrict you with a limit of maximum subscriptions (where a fixed field in the users table always has a length).

    It will allow you later to easily extend your model. For example, different kinds of subscriptions: get notified by RSS, by mail, favorite posts…

    Last but not least, since you are using MySQL, which is a relational database, this way of working (relations, get it?) is much faster in MySQL. It allows for indexes (quick search), foreign keys (users can’t subscribe to a post that does not exist, if a post gets deleted, all subscriptions get deleted automatically) and much more.

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

Sidebar

Related Questions

Let's imagine that we have blog with category A . Category A is currently
Imagine I have a process that starts several child processes. The parent needs to
Imagine I have table like this: id:Product:shop_id 1:Basketball:41 2:Football:41 3:Rocket:45 4:Car:86 5:Plane:86 Now, this
Imagine I have the following: inFile = /adda/adas/sdas/hello.txt # that instruction give me hello.txt
Imagine you have a website with several drop-downs that are populated from the back-end
I have a table called wp-posts with a field post-content. This field contains the
Imagine i have a blog, and i want a footer or sidebar displaying my
imagine i have NSData object and i have 2 options to fill that up.
Imagine I have a table with two columns, a primary key and some data.
Imagine i have an extension method that operates of an interface of abstract objects:

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.