Mysql stored procedure parallel processing -


can call stored procedures in parallel way increase execution speed. eg: have 3 stored procedures extract data 3 master tables , load/insert single source table.currently having 3 procedures :

call sp_1();  call sp_2();  call sp_3(); 

and running in sequential way insert records takes more time. there way run these procedures in parallel way improve execution time , speed process..kindly me possible work around this.

q: can call stored procedures in parallel way increase execution speed.

a: short answer no. there's no built-in mechanism (in mysql) make stored procedure run "in parallel". achieve parallel processing, application need designed that, making use of multiple connections mysql, splitting processing chunks can run in parallel, , coordinating processes.

as far "increase execution speed", you'd need first identify causing slowness.

if issue storage i/o, parallel-izing process not going increase execution speed.

if procedure using cursor, process set row-by-agonizing-row (rbar), , running separate insert statement each row, process bound agonizingly slow. in case, you'd need explore how rows processed in reasonably sized sets.

it's possible procedure executing sql statements written in way prevents mysql making efficient use of available indexes. or, appropriate indexes may not available.

before launching down path of parallel-izing process, it's important understand actual bottleneck is. running process "in parallel" won't increase execution speed.


Comments

Popular posts from this blog

ruby - Trying to change last to "x"s to 23 -

jquery - Clone last and append item to closest class -

c - Unrecognised emulation mode: elf_i386 on MinGW32 -