I have been using Fetch Next (instead of linq query skip.take()) but below query extremely slow how can i handle this slow query. I wanna make it faster.
How to rewrite this sql query and linq version (if it is faster)
var ciftciDestekler = ctx.tblDestek.SqlQuery(
" select d.ParselId,d.DestekId,d.Urun,d.KullanimSekli,d.TarimSekli,d.EkiliAlan,d.DesteklenenAlan,d.Aciklama,d.TarifeId,d.VeriSurumu "+
"from tblCiftci c "+
"inner join tblParsel p on c.CiftciId = p.CiftciId "+
"inner join tblDestek d on p.ParselId = d.ParselId where c.UretimSezonu = 2016 "+
"order by d.DestekId "+
"OFFSET 0 ROWS -- skip 10 rows "+
"FETCH NEXT 10 ROWS ONLY; --").ToList();
Aucun commentaire:
Enregistrer un commentaire