Do I need to create indexes on foreign keys on Oracle?

后端 未结 7 537
粉色の甜心
粉色の甜心 2020-12-02 11:27

I have a table A and a table B. A has a foreign key to B on B\'s primary key, B_ID.

Fo

相关标签:
7条回答
  • 2020-12-02 12:30

    As with anything relating to performance, it depends on many factors and there is no silve bullet e.g. in a very high activilty environment the maintainance of an index may be unacceptable.

    Most salient here would seem to be selectivity: if the values in the index would be highly duplicated then it may give better performance to drop the index (if possible) and allow a table scan.

    0 讨论(0)
提交回复
热议问题