Home » RDBMS Server » Performance Tuning » Consider of load-test invoking only one insert statement (Oracle 11g, any platform)
Consider of load-test invoking only one insert statement [message #676348] Mon, 03 June 2019 23:33 Go to next message
trantuananh24hg
Messages: 744
Registered: January 2007
Location: Ha Noi, Viet Nam
Senior Member
Dear,

I have a case to think about, however, I need your help

- We have a compress partitioned table named as "TBL_MT_BROADCAST", the table will done as following logic: Insert -> select .. where -> update into another table.
- The TBL_MT_BROADCAST is just only automatic partitioning by day. And we have got only one statement insert, we do not allow to change any thing value

insert into TBL_MT_BROADCAST (ID,MSISDN,SERVICE_ID,DATE_CREATE,SENT_TIME,INFO,MO_ID,BRAND_NAME,USERNAME,AUTHENTICATE,STATUS,TOTAL_SEGMENT,IS_READ,COMMAND_CODE,CP_NAME,SERVICE_NAME,PACKAGE_CODE,PACKAGE_PRICE,MT_CONVERT,CONTENT_TYPE,MT_SRC,CP_CHARGE,MT_ID_SERVICE) 
	values (SEQ_TBLMT.nextval,'84856775877','9096',to_date('04-JUN-19','DD-MON-RR'),to_date('04-JUN-19','DD-MON-RR'),'Xin_chao_Viet_nam>',63082224,'PhaiManh','PhaiManh','70609a7f0b8736b28c9d47d164b1f3c3',1,1,0,null,'MEDIA','PHAIMANH','PUSH_PHAIMANH',0,-1,'TEXT','10.144.33.144','MEDIA',1555639389482);

So, my question is:
- Do I use something or some-tool to insert 1 million to 5 million statement at once as simulator?
- Or may you help me to write procedure to test?

Thank you very much.
Re: Consider of load-test invoking only one insert statement [message #676361 is a reply to message #676348] Wed, 05 June 2019 02:48 Go to previous message
John Watson
Messages: 8922
Registered: January 2010
Location: Global Village
Senior Member
The obvious answer is simple:
begin
for 1 in 1..100000 loop
insert into TBL_MT_BROADCAST (ID,MSISDN,SERVICE_ID,DATE_CREATE,SENT_TIME,INFO,MO_ID,BRAND_NAME,USERNAME,AUTHENTICATE,STATUS,TOTAL_SEGMENT,IS_READ,COMMAND_CODE,CP_NAME,SERVICE_NAME,PACKAGE_CODE,PACKAGE_PRICE,MT_CONVERT,CONTENT_TYPE,MT_SRC,CP_CHARGE,MT_ID_SERVICE) 
	values (SEQ_TBLMT.nextval,'84856775877','9096',to_date('04-JUN-19','DD-MON-RR'),to_date('04-JUN-19','DD-MON-RR'),'Xin_chao_Viet_nam>',63082224,'PhaiManh','PhaiManh','70609a7f0b8736b28c9d47d164b1f3c3',1,1,0,null,'MEDIA','PHAIMANH','PUSH_PHAIMANH',0,-1,'TEXT','10.144.33.144','MEDIA',1555639389482);
end loop;
end;
/
but I think you must be asking something more complicated.
For example, all my rows will go into the same partition, and if there is primary or unique key it will fail.
Can you explain the requirement again?
Previous Topic: improve performance on updating clob data
Next Topic: Slow query with hash clustering (latch free - multiblock read objects)
Goto Forum:
  


Current Time: Thu Mar 28 04:02:06 CDT 2024