What does database query and insert speed depend on?

前端 未结 5 701
耶瑟儿~
耶瑟儿~ 2021-02-04 17:29

At my work we have a small database (as in two hundred tables and maybe a total of a million of rows or so).

I\'ve always expected it to be quite fast in the order of se

5条回答
  •  -上瘾入骨i
    2021-02-04 17:50

    Constraints add a small performance penalty. It also has to update indexes for every insert. And if you don't put multiple inserts into a single transaction, the database server has to execute every insert as a new, separate transaction, slowing it down further.

    150 queries/second joining 4 tables sounds normal, though I don't know much about your data.

提交回复
热议问题