Solved

SQL Server 2008: While the data is transferred compression is done, or not?

Posted on 2013-06-20
10
535 Views
Last Modified: 2013-07-08
Dear experts

I developer a WinForm application which connect via Internet to SQL Server 2008. I expect huge use of the application and I want to minimize network traffic as some users will be with mobile internet. I use SQL Server Native Client 10.0 OLE DB Provider with SQLDatareader.

 I’m interesting; does SQL Server do any compression with network traffic? I mean for example, if I have SQLDatareader which open query with 100 rows and in this 100 rows one string column is have 2-3 values only – it make compression or not? Or may be TCP/IP protocol make compression for all ?

 I wonder, if will have effect to use follow technique – the client application first to get strings and its corresponding ID (int) and then the big query to return only ID instead of string. If there is not compression while the data is transferred I know this will pay back the additional effort, that is why the question.

 Open a compress VPN connection is not option for my case.
0
Comment
Question by:dvplayltd
  • 4
  • 2
  • 2
10 Comments
 
LVL 19

Expert Comment

by:Patricksr1972
ID: 39265032
Hi

Sql 2008 does not facilitate in this, to do so you need to make a wrapper like discussed over here.

In our setup we have the webserver cache the output for a specific time windows but not sure if this is applicable in your case.
0
 

Author Comment

by:dvplayltd
ID: 39265129
The data transfered with my application is ONLY dinamyc data respond to user actions (ask for report), so any cash will not help at all.
0
 
LVL 19

Expert Comment

by:Patricksr1972
ID: 39265150
Then the wrapper is the way to go.
0
 

Author Comment

by:dvplayltd
ID: 39280225
wrapper is too expensive solution for me at this point ...

So it has sense to make logically “compress” of data transferred like – I have a recordset which has 300 rows and one field has 20 values only, so I could reduce network traffic with split logically this query on 2 – first to get these 20 values and its ID /int/ and then big query to pass only ID which I’l replace with my application with text ?
0
Top 6 Sources for Identifying Threat Actor TTPs

Understanding your enemy is essential. These six sources will help you identify the most popular threat actor tactics, techniques, and procedures (TTPs).

 
LVL 78

Expert Comment

by:David Johnson, CD, MVP
ID: 39287130
only request what you need right now is the best procedure.

select * from Customers and you only display 20 records and most of the information you don't need is extremely wasteful
SELECT Companyname, Contactname FROM Customers WHERE CompanyName LIKE 'A%'" is a better approach.

SQL 2012 has a nice improvement
SELECT * FROM TableName ORDER BY id OFFSET 10 ROWS FETCH NEXT 10 ROWS ONLY;

A good discussion: http://stackoverflow.com/questions/109232/what-is-the-best-way-to-paginate-results-in-sql-server
0
 

Author Comment

by:dvplayltd
ID: 39287758
To ve2ofa

My task is not to make paging. I get only the fields I need, my ask is - does any compression from SQL Server or libraries respondign for transfer data via internet is done? Read more detaily my question and you will understand.
0
 
LVL 78

Accepted Solution

by:
David Johnson, CD, MVP earned 500 total points
ID: 39287797
There is no compression between the calling iis routine and the sql server, there can be compression (i.e. gzip) between iis and the web client. IIS/Aspnet only sends html data to the client.
0
 

Author Closing Comment

by:dvplayltd
ID: 39306416
10x for your time. My ask is not connected at all with IIS7 - my software connect directly via real IP to SQL Server. So we are talking for IP and SQL Server libraries - only these are involved.  But I guess the answer is the same - no any compression is done?
0

Featured Post

What is SQL Server and how does it work?

The purpose of this paper is to provide you background on SQL Server. It’s your self-study guide for learning fundamentals. It includes both the history of SQL and its technical basics. Concepts and definitions will form the solid foundation of your future DBA expertise.

Join & Write a Comment

Suggested Solutions

International Data Corporation (IDC) prognosticates that before the current the year gets over disbursing on IT framework products to be sent in cloud environs will be $37.1B.
Password hashing is better than message digests or encryption, and you should be using it instead of message digests or encryption.  Find out why and how in this article, which supplements the original article on PHP Client Registration, Login, Logo…
To efficiently enable the rotation of USB drives for backups, storage pools need to be created. This way no matter which USB drive is installed, the backups will successfully write without any administrative intervention. Multiple USB devices need t…
This tutorial will show how to configure a single USB drive with a separate folder for each day of the week. This will allow each of the backups to be kept separate preventing the previous day’s backup from being overwritten. The USB drive must be s…

744 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

15 Experts available now in Live!

Get 1:1 Help Now