posted 14 years ago
thanks selva for quick reply
both A and B are different views
Not sure if ID is primary key in both views. How could i find it. Can views also have primary key. sorry for basic question, please let me know.
ID in view B is not a foreign key, as both these views are totally different.
Date is not part of the key, so i can create a index. thanks for that suggestion. However, can we have index to the views as well. please let me know
However, while you notice this query, there are three conditions getting set while the developer wrote this.
a) He needs all the records in A
b) He needs all the records that are common in A and B, hence he uses the right join (+)
c) He needs all the records in B for the date that is not matching in A
From this I was thinking, if the query could be rewtitten in some way, so that the performance could be tuned well.
Your suggestions would be helpful
Thanks