Parallelized Update of MySQL DB?

64 views Asked by At

I am using R to manage a MySQL database and ran into the following question: Can I use multiple cores to run an update on a table, or does SQL get confused by that? The R code I use works like this (pseudocode):

d_ply(.data = my_local_table, .variables = ~ID, .fun = function(x){
    check if ID exists in my_DB_table
    if(exists):
        Update record
    else:
        Create new record

Is it problematic to use the .parallel option of the plyr package in this case?

0

There are 0 answers