Mam taka metode:
public IEnumerable<string> GetPublikator(string publikator,string rok,string numer,string str,string dodatek)
{
bool czyAkt = CzyAkt(publikator);
DataContext db = new DataContext();
var doki = from d in db.Doks
where
d.P180.Substring(0, 3) == publikator
&& d.Zeszyt.P110 == rok &&
d.Zeszyt.ZeszytP112s.Select(p => p.P112).Contains(numer) &&
d.Zeszyt.Nazwa.Substring(13,3) == dodatek
select d;
if (czyAkt)
{
doki = from d in doki
where d.Pozycja == str
select d;
}
else
{
doki = from d in doki
where d.PozycjaBezLiter == str
select d;
}
return doki.Select(d=>d.P180);
}
Po przeklejeniu takiego sql do ms sql wszystko trwa 15 sekund i znajduje mi dokument,ale w aplikacji wyrzuca mi ''Evolution function timed out" w jaki sposob moge sobie z tym poradzic,bo nie mam juz pojecia,robilem tez za pomoca like ale trwa dluzej wiec jak to zoptymalizowac zeby wkoncu ruszylo, bede wdzieczny za pomoc.