MySQL Partitioning

hi,

does MySQL has any table Partitioning thing?
LVL 1
marrowyungSenior Technical architecture (Data)Asked:
Who is Participating?
 
Pawan KumarConnect With a Mentor Database ExpertCommented:
>>does MySQL has any table Partitioning thing?
Yes

Basically two types Horizontal and Vertical

1. Horizontal Partitioning - In this technique we partitions a large table based on the number of rows. E.g by Dates

Example-

CREATE TABLE yourtableName 
( 
	  id INT NOT NULL
	, name VARCHAR(30)
	, part_id INT NOT NULL 
) 
PARTITION BY RANGE (part_id) 
( 
	PARTITION p0 VALUES LESS THAN (5), PARTITION p1 VALUES LESS THAN (10) 
);

Open in new window


2. Vertical Partitioning - Here we move columns to a separate table. E.g. Employee and Employee Address and then join them using EmployeeId

If you want to understand this in more detail then please refer - https://dzone.com/refcardz/database-partitioning
0
 
marrowyungSenior Technical architecture (Data)Author Commented:
tks.
0
 
marrowyungSenior Technical architecture (Data)Author Commented:
close it first and might come back if more is needed
'
1
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.