We have an application with several Sharepoint document libraries, some of them having millions of documents in them. Due to huge size of lists, the performance is very slow. For eg, sometimes the CAML queries taking about 2-3 minutes to fetch records.
Please advise how can we improve the performance. The documents are going to increase in future.