multi-inserts

  • is this execution (inside a trans block):

    insert into table_1 (nam1, nam2, ..., namN)

    values(val11, val12, ..., val1N);

    insert into table_2 (nam1, nam2, ..., namN)

    values(val21, val22, ..., val2N);

    ...

    insert into table_M (namM1, namM2, ..., namMN)

    values(valM1, valM2, ..., valMN)

    MUCH faster than if I do it one at a time?

  • In truth no, except that they execute immediately one after the other. They should ahve the exacte same execution time as doing seperately but you have to keep in mind the time needed to start the individual transaction seperately will increase thier cumulative time.

    "Don't roll your eyes at me. I will tape them in place." (Teacher on Boston Public)

Viewing 2 posts - 1 through 1 (of 1 total)

You must be logged in to reply to this topic. Login to reply