title: SharePoint: Efficient way to retrieve all list items
body: <p>I am retrieving all items from list containing around 4000 items.
  But it seems to take longer time to fetch all items which is ~15 to ~22 seconds.
  <strong>Is there any best way to fetch all items from list in negligible time?</strong><br />
  Following is the code i am using to fetch all items:</p>
  
  <pre><code> using (SPSite spSite = new SPSite(site))
              {
                  using (SPWeb web = spSite.OpenWeb())
                  {
                      list = web.Lists["ListName"];
                      SPQuery query1 = new SPQuery();
                      string query = "&lt;View&gt;";
                      query += "&lt;ViewFields&gt;";
                      query += "&lt;FieldRef Name='ID' /&gt;";
                      query += "&lt;FieldRef Name='Title' /&gt;";                    
                      query += "&lt;/ViewFields&gt;";
                      query += "&lt;Query&gt;";
                      query += "&lt;Where&gt;";
                      query += "&lt;Eq&gt;";
                      query += "&lt;FieldRef Name='ColName'&gt;&lt;/FieldRef&gt;";
                      query += "&lt;Value Type='Boolean'&gt;1&lt;/Value&gt;";
                      query += "&lt;/Eq&gt;";
                      query += "&lt;/Where&gt;";
                      query += "&lt;/Query&gt;";
  
                      query += "&lt;/View&gt;";
                      query1.Query = query;
                      SPListItemCollection listItems = list.GetItems(query1);
                  }
              }
  </code></pre>