Hello pratik,
the problem comes from that you have used OQL to fetch the data and than LINQ to filter the result set. Now this is of course possible but the actually filtering is done on the client side rather than on the server side and for big amounts of data this can prove to be time consuming. The better aproach will be to retrieve only the records that are going to be shown to the customer.
You can use LINQ to achieve this:
Or using OQL:
Note that in the OQL example we are setting the MaxResultCount property so that we get only 1 entry as a result since there is no First() operant in OQL.
Best wishes,
Petar
the Telerik team