Search code examples
oraclereferential-integrity

select query performance Vs primary,foreign key


i have copied the table structure(without primary and foreign key constraint),data,index(all indexes) from one schema to another schema .

While trying to run a select query with multiple joins(in the new schema) , it is taking much longer time than running the same query in the old schema(with constraints).

Will the omitted foreign and primary key constraints is the reason behind this performance lag?


Solution

  • I had a similar problem with respect to performance while importing objects from one environment to another and then I have added the missing constraints and then I could see good improvement in performance. Hence I would request you to please add the constraints and then run your join query.