I would like to understand if reading data from a SPView gives better response time than reading directly from a SPList.
Basically I got this question as I have a SPlist with almost 30 columns, and I am trying to read only 3 columns in my code. Now I found out that in SP2013, it is possible to use SPQuery.ViewFieldsOnly property to ensure that data from selected columns is fetched. But my organization is currently using WSS 3.0 (WSS3.0 does not have a SPQuery.ViewFieldsOnly property). So I am thinking to create a view to fetch data. My SPList contains many items and I need to prepare a report on a button click event in a SPWebPart. So as you can understand, response time is important to me. I want to save as much execution time as possible by fetching only required fields from my SPList.
I am looking at the following code sample using SPView:
SPListItemCollection coll = web.Lists["ListName"].GetItems(web.Lists["ListName"].Views["ViewName"]);
SPListItemCollection coll = web.Lists["ListName"].GetItems(web.Lists["ListName"]);
Will the SPView sample give a better response time assuming that I have many rows of data in the SPList? or is it the same?