Avatar of Bobomi
Bobomi

asked on 

MySQL Table partition

Hi All,
I NEED SOME ADVISE ON WHAT IS THE BEST WAY TO PARTITION THIS TABLE.

| job_file | CREATE TABLE `job_file` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `job_user_id` int(11) NOT NULL,
  `job_methods_id` int(11) DEFAULT NULL,
  `work_id` int(11) DEFAULT NULL,
  `member_id` int(10) unsigned DEFAULT NULL,
  `subject_uri` text NOT NULL,
  `subject_gram` text,
  `reply` mediumtext,
  `date_entered` datetime NOT NULL,
  `subject_guid` varchar(36) DEFAULT NULL COMMENT ,
  `test_error` tinyint(1) NOT NULL DEFAULT '0',
  PRIMARY KEY (`id`),
  KEY `C_job_methods_job_file` (`job_methods_id`),
  KEY `C_job_user_job_file` (`job_user_id`),
  KEY `C_work_job_job_file` (`work_id`),
  KEY `C_member_job_file` (`member_id`),
  KEY `test_error` (`is_error`),
  KEY `date_entered` (`date_entered`),
  CONSTRAINT `_____C_job_methods_job_file` FOREIGN KEY (`job_methods_id`) REFERENCES `job_methods` (`id`),
  CONSTRAINT `_____C_job_user_job_file` FOREIGN KEY (`job_user_id`) REFERENCES `job_user` (`id`),
  CONSTRAINT `_____C_work_job_file` FOREIGN KEY (`work_id`) REFERENCES `work` (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=155289248 DEFAULT CHARSET=utf8 |
MySQL ServerDatabasesMicrosoft SQL Server

Avatar of undefined
Last Comment
Bobomi
SOLUTION
Avatar of Chris Stanyon
Chris Stanyon
Flag of United Kingdom of Great Britain and Northern Ireland image

Blurred text
THIS SOLUTION IS ONLY AVAILABLE TO MEMBERS.
View this solution by signing up for a free trial.
Members can start a 7-Day free trial and enjoy unlimited access to the platform.
See Pricing Options
Start Free Trial
Avatar of Bobomi
Bobomi

ASKER

Thanks Chris! but the problem is this table is growing so fast so I'm interested in partitioning it.
SOLUTION
Avatar of Chris Stanyon
Chris Stanyon
Flag of United Kingdom of Great Britain and Northern Ireland image

Blurred text
THIS SOLUTION IS ONLY AVAILABLE TO MEMBERS.
View this solution by signing up for a free trial.
Members can start a 7-Day free trial and enjoy unlimited access to the platform.
Avatar of Bobomi
Bobomi

ASKER

Hi Chris thanks for your advice here is a sample of my table
+--------+-------------+----------------+----------+---------+----------+--------------+---------------------+
| id     | job_user_id | job_methods_id|    WORK_id |member_id|test_error| subject_guid | date_entered         |
+--------+-------------+----------------+---------+---------+----------+--------------+---------------------+
| 415425 |           11|             25 |              NULL |            NULL |        0               |  NULL         | 1990-08-28 20:20:30 |
| 438624 |           11|             25 |            NULL |              NULL |        0               | NULL          | 1990-08-28 22:38:36 |
| 445781 |           11|             25 |            NULL |              NULL |        0               | NULL          | 1990-08-29 08:22:42 |
| 450178 |           11|             25 |            NULL |              NULL |        0               | NULL          | 1990-08-29 11:20:29 |
ASKER CERTIFIED SOLUTION
Avatar of Chris Stanyon
Chris Stanyon
Flag of United Kingdom of Great Britain and Northern Ireland image

Blurred text
THIS SOLUTION IS ONLY AVAILABLE TO MEMBERS.
View this solution by signing up for a free trial.
Members can start a 7-Day free trial and enjoy unlimited access to the platform.
Avatar of Bobomi
Bobomi

ASKER

Thanks Chris for you help.
Microsoft SQL Server
Microsoft SQL Server

Microsoft SQL Server is a suite of relational database management system (RDBMS) products providing multi-user database access functionality.SQL Server is available in multiple versions, typically identified by release year, and versions are subdivided into editions to distinguish between product functionality. Component services include integration (SSIS), reporting (SSRS), analysis (SSAS), data quality, master data, T-SQL and performance tuning.

171K
Questions
--
Followers
--
Top Experts
Get a personalized solution from industry experts
Ask the experts
Read over 600 more reviews

TRUSTED BY

IBM logoIntel logoMicrosoft logoUbisoft logoSAP logo
Qualcomm logoCitrix Systems logoWorkday logoErnst & Young logo
High performer badgeUsers love us badge
LinkedIn logoFacebook logoX logoInstagram logoTikTok logoYouTube logo