title: performance issue while binding gridview with huge data
body: <p>Problem: i am trying to fetch huge number of entries from the database and binding it to the gridview which is making my site performance very low.
  what i have used: i have indexed the parameters which are mainly involved while searching. Also i am stroing the database returned queries in session and using it while paging, instead of hitting the database again.</p>
  
  <p>What i want? is there any way we can just retrieve entries from the database for the page size of the grid. my grid page size is 10. So 10 entries would higly enhance the performance of the site. Since there are numerous fields in the datagrid and fetching them takes time. So is there any solution like this?</p>
  
  <p>code for the query:</p>
  
  <pre><code>R1.DBLinqRDataContext objDB = new R1.DBLinqRDataContext();
  return ( from p in (from a in objDB.table1
          orderby a.date descending
          join i in objDB.table2
          on a.ID equals i.ID
                      where ((SqlMethods.Like(a.Location, "%" + loc + "%")) &amp;&amp; (Category != String.Empty ? (Category == "1" ? a.Func &lt; 50 : a.Func &gt; 50) : (SqlMethods.Like(a.loc, "%" + loc + "%"))))
          select a) join r3 in objDB.table3 on p.ID equals r3.CompanyID select p).Distinct().ToList();
  </code></pre>
  
  <p>Any assist?</p>
  
  <p>if any more details please ask....thank you</p>