How many database indexes is too many?

后端 未结 17 2137
终归单人心
终归单人心 2020-12-07 08:09

I\'m working on a project with a rather large Oracle database (although my question applies equally well to other databases). We have a web interface which allows users to

17条回答
  •  情深已故
    2020-12-07 08:46

    Ultimately how many indexes you need depend on the behavior of your applications that ride on top of your database server.

    In general the more inserting you do the more painful your indexes become. Each time you do an insert, all the indexes that include that table have to be updated.

    Now if your application has a decent amount of reading, or even more so if it's almost all reading, then indexes are the way to go as there will be major performance improvements for very little cost.

提交回复
热议问题