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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 29, 20262026-05-29T05:09:24+00:00 2026-05-29T05:09:24+00:00

I have a simple design for DB used by SQL: Table1 – recipeTable key,

  • 0

I have a simple design for DB used by SQL:

Table1 - recipeTable key, value1..N, recipeId
Table2 - recipeInstructions key, instId, text, reciepIdFK (each instruction has entry)
Table3 - recpeIngredients key, ingId, text, recipeIdFK (each ingredient has an entry)

The question is – for doing queries etc on the DB (with joining info from all 3 tables), when will the tables size be a problem (e.g. search will take too much time).

Shoudl I do some clusturing – like table for ids 1..10000 etc.. – or the SQL does it in its own way?

The table size can get up to 100,000 and even more.

Yoav

  • 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-29T05:09:25+00:00Added an answer on May 29, 2026 at 5:09 am

    Firstly, I think you may be missing a table for “ingredients”.

    Recipe
    -------
    RecipeID PK
    Title
    ...
    
    RecipeInstruction
    ------
    RecipeInstructionID PK
    RecipeID FK
    sequence
    description
    
    Ingredient
    ---------
    IngredientID
    Name
    ....
    
    RecipeIngredient
    ------------
    RecipeID FK
    IngredientID FK
    quantity
    

    Secondly, the best way to work on scalability questions is to try them out. Design your database, populate with test data (I’ve used DBMonster in the past), and then work on the queries you need to support. Go for perhaps twice as much data as you think you’ll ever generate in real life. The fact you’re using a DAL doesn’t matter all that much – the DAL just generates the queries for you, and if you get the basics right, you can tune that in the future.

    For your app, I’m guessing you’ll want to run queries like:

    • get all recipes with ingredient x
    • get all recipes in category x
    • get all recipes without ingredient x
    • get all recipes that take less than x minutes
    • get all recipes with ingredients (x, y, z)
    • get all recipes with difficulty x

    As well as combinations of the above. See if your queries work; if they do, leave well enough alone. Seriously, don’t “optimize” just in case. If the queries don’t work, tune them. Learn about indexing, and free text search.

    If that doesn’t work, think about buying bigger hardware. In the long run, it’s cheaper than exotic design solutions (like “one table for records up to 10000” – just imagine the data access logic for that…).

    In very general terms, if your queries can use an index, they’ll perform perfectly adequately joining several tables across many millions or records on modern affordable hardware. It’s safe to assume that all your “ID” columns will be indexed, and that searching by index will be fast.

    What’s likely to be slow is searching on text values if you have to support wildcards (e.g “where ingredient like ‘%banana%’). That’s where I’d put my energy – MySQL has support for free text searching, which is pretty quick.

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

Sidebar

Related Questions

I have a simple question. I am trying to design a simple Android app,
I have a pretty simple question which perhaps someone familiar with Server/Client design &
I am new to Restful concept and have to design a simple API for
What is good design in this simple case: Let's say I have a base
Here's a simple design patterns question: As part of my current project, I have
Lets say I have a simple ecommerce site that sells 100 different t-shirt designs.
I have simple regex \.*\ for me its says select everything between and ,
I have simple win service, that executes few tasks periodically. How should I pass
i have simple regular expression: ^123$ Matches are for example 123 1234 etc. How
I have simple issue setting a two-way databinding of a checkbox in Silverlight 3.0.

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.