Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

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

Posted on 2013-06-20
10
Medium Priority
?
693 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
8 Comments
 
LVL 23

Expert Comment

by:Patrick Bogers
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 23

Expert Comment

by:Patrick Bogers
ID: 39265150
Then the wrapper is the way to go.
0
Simplify Active Directory Administration

Administration of Active Directory does not have to be hard.  Too often what should be a simple task is made more difficult than it needs to be.The solution?  Hyena from SystemTools Software.  With ease-of-use as well as powerful importing and bulk updating capabilities.

 

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
 
LVL 84

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 84

Accepted Solution

by:
David Johnson, CD, MVP earned 1500 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.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

When trying to connect from SSMS v17.x to a SQL Server Integration Services 2016 instance or previous version, you get the error “Connecting to the Integration Services service on the computer failed with the following error: 'The specified service …
Ready to get certified? Check out some courses that help you prepare for third-party exams.
The viewer will learn how to look for a specific file type in a local or remote server directory using PHP.
There are cases when e.g. an IT administrator wants to have full access and view into selected mailboxes on Exchange server, directly from his own email account in Outlook or Outlook Web Access. This proves useful when for example administrator want…

782 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