Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    text
    copied!<p>What I can see you have these options:</p> <ul> <li>Increase the timeout (Bad idé just moves the problem in the future)</li> <li>Instead of doing a linq query. Get the data by a store procedure</li> <li>Make the grid page. So you just retrieve the data for target page.</li> <li>Look at the query plan and see if you can do any indexes on the column that you are doing your <code>where</code> statements on and <code>order by</code>.</li> <li>Why do you need to have billions of rows in a datagrid. What is the requirements? Maybe you can just show <code>top 1000</code> or <code>top 10000</code>. Because from a user respective I can not see any pros of seeing a grid with a billion rows.</li> </ul> <p>That was just top of my head.</p> <p><strong>EDIT</strong></p> <p>And if I would have this function I would start looking at this section of the code:</p> <pre><code>if (p_Criteria.Titles.Count &gt; 0) { internetQuery = internetQuery.AsEnumerable().Where(c =&gt; p_Criteria.Titles.Contains(c.Title)).AsQueryable(); } if (p_Criteria.MachineNames.Count &gt; 0) { internetQuery = internetQuery.AsEnumerable().Where(c =&gt; p_Criteria.MachineNames.Contains(c.MachineName)).AsQueryable(); } if (p_Criteria.Severities.Count &gt; 0) { internetQuery = internetQuery.AsEnumerable().Where(c =&gt; p_Criteria.Severities.Contains(c.Severity)).AsQueryable(); } </code></pre> <p>This actually make a IEnumerable of the result and then you do the in memory <code>where</code> statements with database calls. You might also have a problem doing this because when you call the related tables it call the database. Maybe you can fetch the rows and then do the <code>contains</code> with a id of the <code>IQueryable</code> . All the pros of having a <code>IQueryable</code> diapers when doing this.</p>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload