We have wrote an sp to get zero price records. It will first check in Account table for active account. then in pricehistory table and it will compare in position table, audit table . getting this records took 20 min for me. size of table Account 500000 position 20000000 audit 20000000 pricehistor 30000000 How to improve the performance.