Tag: sql

Pagination and Sorting via SQL

PAGINATION is the concept of splitting a larger data set into several smaller sets before transferring and displaying to the user. What this means is that instead of sending large bulks of information across the wire, that would otherwise consume a lot of resources (network traffic, memory/cache etc), we split the large bulks into smaller manageable chunks and only handle as much data that is needed.

Pagination can be seen everywhere; from Blogs and Forums, to News sites. All these use some form of pagination or another. Without pagination Forums would be showing thousands of topics at once instead of showing 20 topics per page; Blogs would be showing hundreds of blog posts per page instead of 10 posts per page. News sites… well.. they would take a rather long time to load if they displayed all of articles at once!

There are several forms of Pagination available; and no doubt you would have come across one or more already:

  • The first is what I refer to as Preemptive Loading
  • The second is On Demand Loading

In this article I will explain each of these in detail. I will explain the short comings of Preemptive Loading, and the benefits of On Demand Loading; and also explain how On Demand Loading can be achieved via SQL Server…

(continue reading…)

Comments Off on Pagination and Sorting via SQL more...

How to implement a SQL Connection Scope

IF you have used Data Adapters, you may have noticed that every call to the Fill method will instantiate a new SQL Connection. Say that you loop through a list of items and call the Data Adapter’s Fill method, each call will create a new SQL process (and can be seen in the SQL Server Activity Monitor); these processes each have their own SQL Connection established with the SQL Server – even when the queries originate from a single application request thread or method.

Not only does this require additional server resources, it is also a quick way to empty out the Connection Pool available in your system. Think of it as a DDOS attack that will ultimately block all communications to your server.

(continue reading…)

Comments Off on How to implement a SQL Connection Scope more...

Using SQL FileStream Types in your Databases

of the guide to SQL Server FileStream Types provided you with the steps necessary to enable SQL FileStream Types in your SQL Server instances.  In this Part 2 article I will explain how you setup a Database to use SQL FileStreams, how to create a Table with the FileStream Type attribute. And how to Insert and Select Filestream data…

(continue reading…)

Comments Off on Using SQL FileStream Types in your Databases more...

Copyright © Nullable Code. All rights reserved.