Using Dataset Should i paginate in Server or in the dataset query
I am using strongly typed dataset, for a website that i am creating
Should I modify my dataset query to bring 10 results every time or should I go with Linq and paginate through the data I already got from the list
For example, I can use
List<T> newsList = news.GetList().Take(x).Skip(x);
or I can go with
Select * from News Order By NewsId Desc Offset 0 Rows Fetch Next 1 Rows Only;
c# asp.net dataset
add a comment |
I am using strongly typed dataset, for a website that i am creating
Should I modify my dataset query to bring 10 results every time or should I go with Linq and paginate through the data I already got from the list
For example, I can use
List<T> newsList = news.GetList().Take(x).Skip(x);
or I can go with
Select * from News Order By NewsId Desc Offset 0 Rows Fetch Next 1 Rows Only;
c# asp.net dataset
Better yet: we are in 2018, almost 2019, there are almost no good reasons at all to use DataTable/DataSet, let alone in new developments. You should be looking at using an ORM
– Camilo Terevinto
Nov 23 '18 at 23:38
add a comment |
I am using strongly typed dataset, for a website that i am creating
Should I modify my dataset query to bring 10 results every time or should I go with Linq and paginate through the data I already got from the list
For example, I can use
List<T> newsList = news.GetList().Take(x).Skip(x);
or I can go with
Select * from News Order By NewsId Desc Offset 0 Rows Fetch Next 1 Rows Only;
c# asp.net dataset
I am using strongly typed dataset, for a website that i am creating
Should I modify my dataset query to bring 10 results every time or should I go with Linq and paginate through the data I already got from the list
For example, I can use
List<T> newsList = news.GetList().Take(x).Skip(x);
or I can go with
Select * from News Order By NewsId Desc Offset 0 Rows Fetch Next 1 Rows Only;
c# asp.net dataset
c# asp.net dataset
edited Nov 23 '18 at 23:37
Camilo Terevinto
18.7k63666
18.7k63666
asked Nov 23 '18 at 23:27
ButtmanButtman
249
249
Better yet: we are in 2018, almost 2019, there are almost no good reasons at all to use DataTable/DataSet, let alone in new developments. You should be looking at using an ORM
– Camilo Terevinto
Nov 23 '18 at 23:38
add a comment |
Better yet: we are in 2018, almost 2019, there are almost no good reasons at all to use DataTable/DataSet, let alone in new developments. You should be looking at using an ORM
– Camilo Terevinto
Nov 23 '18 at 23:38
Better yet: we are in 2018, almost 2019, there are almost no good reasons at all to use DataTable/DataSet, let alone in new developments. You should be looking at using an ORM
– Camilo Terevinto
Nov 23 '18 at 23:38
Better yet: we are in 2018, almost 2019, there are almost no good reasons at all to use DataTable/DataSet, let alone in new developments. You should be looking at using an ORM
– Camilo Terevinto
Nov 23 '18 at 23:38
add a comment |
1 Answer
1
active
oldest
votes
My adivse is to always do Pagination and Filtering in the DB query. Moving that to the UI only get's you excess load on teh SQL server, Network, Memory. And at worst, race conditions/trigger update race condition detection.
This is even more true in WebDevelopment. The page lifecycle dictates that the page is to be built, a postback processed, send to the user - and then isntantly dropepd out of memory. You would have to go out of your way to persist the data and that in itself can cause a host of issues. ASP.Net is even more vulnerable to OOM exceptions then normal .NET applications and DB queries and linq are right up there for culptripts: https://blogs.iis.net/webtopics/troubleshooting-system-outofmemoryexceptions-in-asp-net
While this answer has its good points, it's only in the first paragraph. The article is from 2009. There are almost no 32-bit OS now, and web applications have used tens of GB for many, many years. Also, that article does not mention LINQ a single time, so not sure what that point would be about.
– Camilo Terevinto
Nov 23 '18 at 23:41
@CamiloTerevinto Right, it mentioend RegEx, not Linq. It has been a while since I read it, so something might have gotten crossed in memory. As for the memory limits: You will jsut run into OOM's later, when it is harder to fix the design. And we are talking about DB table dumps. Some retrieval approaches temproarily double the amount of ram needed. And DB tables can still be GiB's worth of data easily.
– Christopher
Nov 23 '18 at 23:44
add a comment |
Your Answer
StackExchange.ifUsing("editor", function () {
StackExchange.using("externalEditor", function () {
StackExchange.using("snippets", function () {
StackExchange.snippets.init();
});
});
}, "code-snippets");
StackExchange.ready(function() {
var channelOptions = {
tags: "".split(" "),
id: "1"
};
initTagRenderer("".split(" "), "".split(" "), channelOptions);
StackExchange.using("externalEditor", function() {
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled) {
StackExchange.using("snippets", function() {
createEditor();
});
}
else {
createEditor();
}
});
function createEditor() {
StackExchange.prepareEditor({
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader: {
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
},
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
});
}
});
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53453850%2fusing-dataset-should-i-paginate-in-server-or-in-the-dataset-query%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
1 Answer
1
active
oldest
votes
1 Answer
1
active
oldest
votes
active
oldest
votes
active
oldest
votes
My adivse is to always do Pagination and Filtering in the DB query. Moving that to the UI only get's you excess load on teh SQL server, Network, Memory. And at worst, race conditions/trigger update race condition detection.
This is even more true in WebDevelopment. The page lifecycle dictates that the page is to be built, a postback processed, send to the user - and then isntantly dropepd out of memory. You would have to go out of your way to persist the data and that in itself can cause a host of issues. ASP.Net is even more vulnerable to OOM exceptions then normal .NET applications and DB queries and linq are right up there for culptripts: https://blogs.iis.net/webtopics/troubleshooting-system-outofmemoryexceptions-in-asp-net
While this answer has its good points, it's only in the first paragraph. The article is from 2009. There are almost no 32-bit OS now, and web applications have used tens of GB for many, many years. Also, that article does not mention LINQ a single time, so not sure what that point would be about.
– Camilo Terevinto
Nov 23 '18 at 23:41
@CamiloTerevinto Right, it mentioend RegEx, not Linq. It has been a while since I read it, so something might have gotten crossed in memory. As for the memory limits: You will jsut run into OOM's later, when it is harder to fix the design. And we are talking about DB table dumps. Some retrieval approaches temproarily double the amount of ram needed. And DB tables can still be GiB's worth of data easily.
– Christopher
Nov 23 '18 at 23:44
add a comment |
My adivse is to always do Pagination and Filtering in the DB query. Moving that to the UI only get's you excess load on teh SQL server, Network, Memory. And at worst, race conditions/trigger update race condition detection.
This is even more true in WebDevelopment. The page lifecycle dictates that the page is to be built, a postback processed, send to the user - and then isntantly dropepd out of memory. You would have to go out of your way to persist the data and that in itself can cause a host of issues. ASP.Net is even more vulnerable to OOM exceptions then normal .NET applications and DB queries and linq are right up there for culptripts: https://blogs.iis.net/webtopics/troubleshooting-system-outofmemoryexceptions-in-asp-net
While this answer has its good points, it's only in the first paragraph. The article is from 2009. There are almost no 32-bit OS now, and web applications have used tens of GB for many, many years. Also, that article does not mention LINQ a single time, so not sure what that point would be about.
– Camilo Terevinto
Nov 23 '18 at 23:41
@CamiloTerevinto Right, it mentioend RegEx, not Linq. It has been a while since I read it, so something might have gotten crossed in memory. As for the memory limits: You will jsut run into OOM's later, when it is harder to fix the design. And we are talking about DB table dumps. Some retrieval approaches temproarily double the amount of ram needed. And DB tables can still be GiB's worth of data easily.
– Christopher
Nov 23 '18 at 23:44
add a comment |
My adivse is to always do Pagination and Filtering in the DB query. Moving that to the UI only get's you excess load on teh SQL server, Network, Memory. And at worst, race conditions/trigger update race condition detection.
This is even more true in WebDevelopment. The page lifecycle dictates that the page is to be built, a postback processed, send to the user - and then isntantly dropepd out of memory. You would have to go out of your way to persist the data and that in itself can cause a host of issues. ASP.Net is even more vulnerable to OOM exceptions then normal .NET applications and DB queries and linq are right up there for culptripts: https://blogs.iis.net/webtopics/troubleshooting-system-outofmemoryexceptions-in-asp-net
My adivse is to always do Pagination and Filtering in the DB query. Moving that to the UI only get's you excess load on teh SQL server, Network, Memory. And at worst, race conditions/trigger update race condition detection.
This is even more true in WebDevelopment. The page lifecycle dictates that the page is to be built, a postback processed, send to the user - and then isntantly dropepd out of memory. You would have to go out of your way to persist the data and that in itself can cause a host of issues. ASP.Net is even more vulnerable to OOM exceptions then normal .NET applications and DB queries and linq are right up there for culptripts: https://blogs.iis.net/webtopics/troubleshooting-system-outofmemoryexceptions-in-asp-net
answered Nov 23 '18 at 23:31
ChristopherChristopher
2,9582723
2,9582723
While this answer has its good points, it's only in the first paragraph. The article is from 2009. There are almost no 32-bit OS now, and web applications have used tens of GB for many, many years. Also, that article does not mention LINQ a single time, so not sure what that point would be about.
– Camilo Terevinto
Nov 23 '18 at 23:41
@CamiloTerevinto Right, it mentioend RegEx, not Linq. It has been a while since I read it, so something might have gotten crossed in memory. As for the memory limits: You will jsut run into OOM's later, when it is harder to fix the design. And we are talking about DB table dumps. Some retrieval approaches temproarily double the amount of ram needed. And DB tables can still be GiB's worth of data easily.
– Christopher
Nov 23 '18 at 23:44
add a comment |
While this answer has its good points, it's only in the first paragraph. The article is from 2009. There are almost no 32-bit OS now, and web applications have used tens of GB for many, many years. Also, that article does not mention LINQ a single time, so not sure what that point would be about.
– Camilo Terevinto
Nov 23 '18 at 23:41
@CamiloTerevinto Right, it mentioend RegEx, not Linq. It has been a while since I read it, so something might have gotten crossed in memory. As for the memory limits: You will jsut run into OOM's later, when it is harder to fix the design. And we are talking about DB table dumps. Some retrieval approaches temproarily double the amount of ram needed. And DB tables can still be GiB's worth of data easily.
– Christopher
Nov 23 '18 at 23:44
While this answer has its good points, it's only in the first paragraph. The article is from 2009. There are almost no 32-bit OS now, and web applications have used tens of GB for many, many years. Also, that article does not mention LINQ a single time, so not sure what that point would be about.
– Camilo Terevinto
Nov 23 '18 at 23:41
While this answer has its good points, it's only in the first paragraph. The article is from 2009. There are almost no 32-bit OS now, and web applications have used tens of GB for many, many years. Also, that article does not mention LINQ a single time, so not sure what that point would be about.
– Camilo Terevinto
Nov 23 '18 at 23:41
@CamiloTerevinto Right, it mentioend RegEx, not Linq. It has been a while since I read it, so something might have gotten crossed in memory. As for the memory limits: You will jsut run into OOM's later, when it is harder to fix the design. And we are talking about DB table dumps. Some retrieval approaches temproarily double the amount of ram needed. And DB tables can still be GiB's worth of data easily.
– Christopher
Nov 23 '18 at 23:44
@CamiloTerevinto Right, it mentioend RegEx, not Linq. It has been a while since I read it, so something might have gotten crossed in memory. As for the memory limits: You will jsut run into OOM's later, when it is harder to fix the design. And we are talking about DB table dumps. Some retrieval approaches temproarily double the amount of ram needed. And DB tables can still be GiB's worth of data easily.
– Christopher
Nov 23 '18 at 23:44
add a comment |
Thanks for contributing an answer to Stack Overflow!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53453850%2fusing-dataset-should-i-paginate-in-server-or-in-the-dataset-query%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Better yet: we are in 2018, almost 2019, there are almost no good reasons at all to use DataTable/DataSet, let alone in new developments. You should be looking at using an ORM
– Camilo Terevinto
Nov 23 '18 at 23:38