Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people, just like you, are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
Solved

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

Posted on 2013-06-20
10
583 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 20

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 20

Expert Comment

by:Patrick Bogers
ID: 39265150
Then the wrapper is the way to go.
0
Netscaler Common Configuration How To guides

If you use NetScaler you will want to see these guides. The NetScaler How To Guides show administrators how to get NetScaler up and configured by providing instructions for common scenarios and some not so common ones.

 

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 80

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 80

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

Master Your Team's Linux and Cloud Stack!

The average business loses $13.5M per year to ineffective training (per 1,000 employees). Keep ahead of the competition and combine in-person quality with online cost and flexibility by training with Linux Academy.

Question has a verified solution.

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

Why is this different from all of the other step by step guides?  Because I make a living as a DBA and not as a writer and I lived through this experience. Defining the name: When I talk to people they say different names on this subject stuff l…
I have a large data set and a SSIS package. How can I load this file in multi threading?
This tutorial will walk an individual through the process of transferring the five major, necessary Active Directory Roles, commonly referred to as the FSMO roles to another domain controller. Log onto the new domain controller with a user account t…
The viewer will learn how to create and use a small PHP class to apply a watermark to an image. This video shows the viewer the setup for the PHP watermark as well as important coding language. Continue to Part 2 to learn the core code used in creat…

809 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