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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 22, 20262026-05-22T21:31:02+00:00 2026-05-22T21:31:02+00:00

it seems that it is a common practice to divide the data of one

  • 0

it seems that it is a common practice to divide the data of one table into many databases, many tables to improve performance, i can understand the many databases part, because more databases provides more CPUS, more memories, more IO capacity. but many tables? why not just use mysql partitions http://dev.mysql.com/doc/refman/5.1/en/partitioning.html?

update: i dont mean normalization. i mean divide a table of N records into e.g. 10 tables each of the small table have N/10 records

update2: thanks @Johan for the clarification of sharding and partition, especially point out the hot property of the data.

The small question @Johan did not answer is: for a simple example, lets say we have a user table, it has a userid column(bigint). I think it is easier to use mysql-partition to divide the table into partitions based on userid automatically, there seems no benifit to divide the table into small tables manually(based on userid), am i right?

  • 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-22T21:31:03+00:00Added an answer on May 22, 2026 at 9:31 pm

    I think you have a few terms mixed up here.

    All your data goes into one database (aka schema).
    In a database you can have tables.

    e.g.

    table employee
       id integer
       name varchar
       address varchar
       country varchar
    
    table office
       id integer
       employee_id integer
       address varchar
    

    Inside tables you have fields (id, name, address) aka columns.
    And tables have one or more rows.
    An example for table employee:

    id  name        address           country
    ----------------------------------------------------
    1   John        1 Regent Street   UK
    2   James       24 Jump Street    China
    3   Darth Vader 1 Death Star      Bestine, Tatooine
    

    So much for the basics.

    Why partitioning
    Now suppose that we have lots and lots of people (rows) in our database.
    Remember this a galactic database, so we have 100 billion records.
    If we want to search trough this fast it’s nice if we can do this in parallel.
    So we partition the table (say by country) and then we can have x servers looking in 1 country each.
    Partitioning across servers is called sharding.

    Or we can partition e.g. historical data by year, so we don’t have to go through all the data just to get the recent news. We only have to go through the partition for this year. This is called partitioning.

    What’s the big difference between sharding can just partitioning?

    Sharding
    In sharding you anticipate that all your data is relevant, and equally likely to be queried. (e.g. google can expect all their data to be queried; archiving part of their data is useless for them).
    In this case you want lots of machines to look though your data in parallel, where each machine does part of the work.
    So you give each machine a different partition (shard) of the data and give all the machines the same query. When the results come out you UNION them all together and output the result.

    Basic partitioning
    In basic partitioning part of your data is hot and part is not. A typical case is historical data, the new data is hot, the old data hardly gets touched.
    For this use case it is pointless to put the old data in separate servers. Those machines will just wait and wait and do nothing because nobody cares about the old data except some auditors who look at it once a year.
    So you partition that data by year and the server will automatically archive the old partitions so your queries will only look at one (maybe 2) years of data and be much faster.

    Do I need partitioning?
    You only do partitioning when you have lots and lots of data, because it complicates your setup.
    Unless you have more than a million records you don’t have to consider partitioning.*)
    If you have more than a 100 million records, you should definitely consider it.*)

    For more info see: http://dev.mysql.com/doc/refman/5.1/en/partitioning.html
    and: http://blog.mayflower.de/archives/353-Is-MySQL-partitioning-useful-for-very-big-real-life-problems.html
    See also wiki: http://en.wikipedia.org/wiki/Partition_%28database%29


    *) These are just my personal heuristics YMMV.

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

Sidebar

Related Questions

It seems that the following is a common method given in many tutorials on
I am building a Rails app, and it seems that common practice is to
It seems to me that the most common overly ambitious project that programmers (esp.
It seems to be a common requirement nowadays to have a search feature that
i have several common elements (components), that will generate some html. it seems my
Currently it seems common practice to parse Postfix log files in order to determine
it seems to be a common practice to use a div with a class
Is there a common method/best practice/any means for combining forms that span multiple related
In ASP.NET MVC it seems to be common practice not to use GET requests
Common practice might be to put asserts in code to check input parameters, data

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.