MSMQ v Database Table

后端 未结 11 770
难免孤独
难免孤独 2020-12-24 07:24

An existing process changes the status field of a booking record in a table, in response to user input.

I have another process to write, that will run asynchronously

11条回答
  •  無奈伤痛
    2020-12-24 08:03

    I have recently been investigating this myself so wanted to mention my findings. The location of the Database in comparison to your application is a big factor on deciding which option is faster.

    I tested inserting the time it took to insert 100 database entries versus logging the exact same data into a local MSMQ message. I then took the average of the results of performing this test several times.

    What I found was that when the database is on the local network, inserting a row was up to 4 times faster than logging to an MSMQ.

    When the database was being accessed over a decent internet connection, inserting a row into the database was up to 6 times slower than logging to an MSMQ.

    So:

    Local database - DB is faster, otherwise MSMQ is.

提交回复
热议问题