Mariadb – how to insert big data in mariadb with execution time less than max_statement_time value

bulk-insertinsertmariadb

i have some table with this structure.

CREATE TABLE `trcdmppdetail` (
  `mpp_code` varchar(50) NOT NULL,
  `company_code` varchar(50) NOT NULL,
  `mppdetail_date` datetime(3) NOT NULL,
  `position_id` int(11) DEFAULT NULL,
  `basedon_code_1` varchar(50) NOT NULL,
  `basedon_code_2` varchar(50) NOT NULL,
  `mpp_emp` int(11) DEFAULT NULL,
  `actualemp_onrequest` int(11) DEFAULT NULL,
  `dept_id` int(11) NOT NULL,
  `created_date` datetime(3) DEFAULT NULL,
  `created_by` varchar(50) DEFAULT NULL,
  `modified_date` datetime(3) DEFAULT NULL,
  `modified_by` varchar(50) DEFAULT NULL,
  PRIMARY KEY (`mpp_code`,`company_code`,`mppdetail_date`,`basedon_code_1`,`basedon_code_2`,`dept_id`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1 `ENCRYPTED`=YES `ENCRYPTION_KEY_ID`=3488

and value on global variable max_statement_time=60

i insert 50k row data on thats table but i got error because my query run more than max_statement_time
my dba can't allow me to change global variable max_statement_time=0 becuase he says will be distruption the server.

so how to i insert the data with execution time less than max_statement_time value.

Best Answer

Don't change the GLOBAL setting; change the SESSION setting.