I have a sp which has to select data from 8 tables and each select query has a lot of 'where clauses' and each table has thousands of rows of data.
Now, the requirement is to increase performance of this sp. Below mentioned approaches are suggested and respectively my questions for them are mentioned below:
- create few other tables which will store frequently asked data (eg : for current year), so use these table for current year data which is asked 50 percent of time. and use original tables for years other than current year. As this will limit the data ,thus we are expecting increase in performance. So my question is : will this result in substantial improvement in performance? because anyhow where clauses also limit the data to be selected. Or how does reducing the data provided to sql relates to performance
- create partitions on existing table based on years. I have no idea how these partition works. So if anyone can throw some light on this, that would be appreciated.