0

I'm hosting a nodejs application. And I'm using Mysql database to store data. This application is a blogging site and there is a possibility that it will have a more data within short time during production.

When I want to create a table using phpMyAdmin I keep seeing the option to separate/divide my tables into partitions.

I have visited this page and many other pages but I can't find the information related to my question as well as here where they're just explain the basic knowledge of what mysql partioning is.

What I want to know and be sure of is if I can skip the part where I create these partitions so that I can create them in future or I have to create these partitions together with the tables.

James
  • 120
  • 1
  • 7
  • Partitioning does not solely relate to mySQL its a database theory of segmenting large volume data, based on how frequently data is queried into blocks of addressable segments. You should read up on horizontal and vertical partitioning. As your query seems to relate to the fact that you may be wanting to store a large volume of data, then consideration needs to be given to how frequently the data will be queried / used – jimmy8ball Jul 16 '19 at 15:01
  • Yes I've seen the documentation on types of partitioning. What I'm sure about is if I have to create partitions to creating table or before. – James Jul 16 '19 at 15:07

1 Answers1

0

You can ALTER TABLE later and add (horizontal) partitions.

When designing the table now, don't forget to add the column you want to partition the table later on. For instance, if you want to partition the blog by publication date you will need to have a publication data column. This sounds obvious, but I have seen a lot of cases where this type of data was simply absent from the table.

KIKO Software
  • 15,283
  • 3
  • 18
  • 33
  • In my case the partitions will be on ```createdAt: Date``` and ```visible: Boolean```. Thank for info man... I will just do partitions in future since I have less data right now. – James Jul 16 '19 at 15:16