MySQL Forums
Forum List  »  InnoDB

Re: taking long time to ALTER the table
Posted by: Ra Nala
Date: April 14, 2016 12:23AM

Oh sorry i got it now. and when i altering the table it is taking 1 mintues for 4000000 records. version is 5.7(Innodb). hope it is not worthable.


Table Create Table
--------------- --------------------------------------------------------------
p_lang_01 CREATE TABLE ,p_lang_01, (
,ps_key, bigint(20) NOT NULL,
,ps_id, bigint(20) NOT NULL,
,prod_srl_no, varchar(200) DEFAULT NULL,
,b_date, datetime DEFAULT NULL,
,ship_date, datetime DEFAULT NULL,
,invoice_date, datetime DEFAULT NULL,
,invoice_no, varchar(100) DEFAULT NULL,
,tenant_id, bigint(20) DEFAULT NULL,
,model_id, bigint(20) DEFAULT NULL,
,model, varchar(50) DEFAULT NULL,
,brand_name, varchar(250) DEFAULT NULL,
,prod_name, varchar(250) DEFAULT NULL,
,sb_id, bigint(20) DEFAULT NULL,
,sb_code, varchar(50) DEFAULT NULL,
sb_type_code, varchar(50) DEFAULT NULL,
,sb_name, varchar(250) DEFAULT NULL,
,ib_code, varchar(50) DEFAULT NULL,
,ib_type_code, varchar(50) DEFAULT NULL,
,ib_name, varchar(250) DEFAULT NULL,
,prod_r_id, bigint(20) DEFAULT NULL,
,status_code, varchar(50) DEFAULT NULL,
,r_type, varchar(50) DEFAULT NULL,
,c_delivery_date, datetime DEFAULT NULL,
,r_date, datetime DEFAULT NULL,
,r_reference, varchar(100) DEFAULT NULL,
,r_source, varchar(100) DEFAULT NULL,
,r_industry, varchar(50) DEFAULT NULL,
,r_application, varchar(50) DEFAULT NULL,
,invoice_customer_reference, varchar(100) DEFAULT NULL,
,r_invoice_no, varchar(100) DEFAULT NULL,
,sales_person, varchar(255) DEFAULT NULL,
,cb_code, varchar(50) DEFAULT NULL,
,cb_type_code, varchar(50) DEFAULT NULL,
,cb_name, varchar(250) DEFAULT NULL,
,c_address_1, varchar(100) DEFAULT NULL,
,c_address_2, varchar(100) DEFAULT NULL,
,c_address_3, varchar(100) DEFAULT NULL,
,c_city, varchar(50) DEFAULT NULL,
,c_email, varchar(100) DEFAULT NULL,
,c_zip, varchar(10) DEFAULT NULL,
,c_mobile_value, varchar(50) DEFAULT NULL,
,c_mobile_ext, varchar(10) DEFAULT NULL,
,c_work_value, varchar(50) DEFAULT NULL,
,c_work_ext, varchar(10) DEFAULT NULL,
,c_fax_value, varchar(50) DEFAULT NULL,
,c_fax_ext, varchar(10) DEFAULT NULL,
,rb_code, varchar(50) DEFAULT NULL,
,rb_type_code, varchar(50) DEFAULT NULL,
,rb_name, varchar(250) DEFAULT NULL,
,rb_address_1, varchar(100) DEFAULT NULL,
,rb_address_2, varchar(100) DEFAULT NULL,
,rb_address_3, varchar(100) DEFAULT NULL,
,rb_city, varchar(50) DEFAULT NULL,
,rb_email, varchar(100) DEFAULT NULL,
,rb_zip, varchar(10) DEFAULT NULL,
,rb_mobile_value, varchar(50) DEFAULT NULL,
,rb_mobile_ext, varchar(10) DEFAULT NULL,
,rb_work_value, varchar(50) DEFAULT NULL,
,rb_work_ext, varchar(10) DEFAULT NULL,
,rb_fax_value, varchar(50) DEFAULT NULL,
,rb_fax_ext, varchar(10) DEFAULT NULL,
,purchase_price, double DEFAULT NULL,
,purchase_date, datetime DEFAULT NULL,
,c_type_01, varchar(50) DEFAULT NULL,
,c_name_01, varchar(250) DEFAULT NULL,
,sd_01, datetime DEFAULT NULL,
,end_date_01, datetime DEFAULT NULL,
,c_type_02, varchar(50) DEFAULT NULL,
,c_name_02, varchar(250) DEFAULT NULL,
,sd_02, datetime DEFAULT NULL,
,end_date_02, datetime DEFAULT NULL,
,end_of_life, datetime DEFAULT NULL,
,end_of_srvc, datetime DEFAULT NULL,
,end_of_wrrnty_period, datetime DEFAULT NULL,
,std_wrrnty_period, int(11) DEFAULT NULL,
,prod_extn_id, bigint(20) DEFAULT NULL,
,is_serilized, char(1) DEFAULT NULL,
,prod_code, varchar(100) DEFAULT NULL,
,prod_type, varchar(50) DEFAULT NULL,
,cat_id, bigint(20) DEFAULT NULL,
,sub_cat_id, bigint(20) DEFAULT NULL,
,locale_id, int(11) DEFAULT NULL,
,sb_reference, varchar(100) DEFAULT NULL,
,sb_region, varchar(50) DEFAULT NULL,
,ib_reference, varchar(100) DEFAULT NULL,
,ib_region, varchar(50) DEFAULT NULL,
,brand_id, bigint(20) DEFAULT NULL,
,brand_code, varchar(50) DEFAULT NULL,
,prod_srl_extn_id, bigint(20) DEFAULT NULL,
,cat_code, varchar(100) DEFAULT NULL,
,cat_name, varchar(250) DEFAULT NULL,
,sub_cat_code, varchar(100) DEFAULT NULL,
,sub_cat_name, varchar(250) DEFAULT NULL,
,prod_description, varchar(500) DEFAULT NULL,
,rp_srl_no, varchar(200) DEFAULT NULL,
,rltd_model, varchar(50) DEFAULT NULL,
,p_ib_code, varchar(50) DEFAULT NULL,
,db_id, bigint(20) DEFAULT NULL,
,db_code, varchar(50) DEFAULT NULL,
,pdb_code, varchar(50) DEFAULT NULL,
,pdb_name, varchar(250) DEFAULT NULL,
,p_sb_code, varchar(50) DEFAULT NULL,
,p_sb_name, varchar(250) DEFAULT NULL,
,created_date, datetime DEFAULT NULL,
,updated_date, datetime DEFAULT NULL,
,od_created_date, datetime DEFAULT NULL,
,od_updated_date, datetime DEFAULT NULL,
,db_name, varchar(250) DEFAULT NULL,
PRIMARY KEY (,ps_key,),
KEY ,inx_ps_id, (,ps_id,),
KEY ,inx_prod_r_id, (,prod_r_id,),
KEY ,inx_sb_id, (,sb_id,)
) ENGINE=InnoDB DEFAULT CHARSET=utf8

1 record(s) selected [Fetch MetaData: 0/ms] [Fetch Data: 0/ms]

[Executed: 4/14/16 6:16:28 AM GMT ] [Execution: 287/ms]

Options: ReplyQuote


Subject
Views
Written By
Posted
1154
April 07, 2016 07:47AM
Re: taking long time to ALTER the table
637
April 14, 2016 12:23AM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.