Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 General SQL Server Forums
 New to SQL Server Programming
 IP or DNS : difference in performance ?

Author  Topic 

fabianus76
Posting Yak Master

191 Posts

Posted - 2006-09-22 : 07:24:59
Hello guys,

I would like to know if there is any meaningful difference in speed performance between using the DNS ("sql.server.com") or the IP address of the sql-server in the connection string.
The advantage of using DNS is that if there is any change in IP, I do not have to change the connection strings, but I do not want to loose speed because of the necessity to resolve the DNS.

Thanks for any help!

Regards,
Fabian

my favorit hoster is ASPnix : www.aspnix.com !

SwePeso
Patron Saint of Lost Yaks

30421 Posts

Posted - 2006-09-22 : 07:27:45
Only when creating the connection, there is a round-trip to dns server to get ip-address.



Peter Larsson
Helsingborg, Sweden
Go to Top of Page

afrika
Master Smack Fu Yak Hacker

2706 Posts

Posted - 2006-09-22 : 09:02:20
I use the IP address, but when it comes to connecting via client network utility, then use the DNS

Afrika
Go to Top of Page

fabianus76
Posting Yak Master

191 Posts

Posted - 2006-09-22 : 10:28:16
Thanks for answering.
Did anybody some testing to measure the diffrence? Probably this depends on location of request and speed of DNS-server.

Regards,
Fabian

my favorit hoster is ASPnix : www.aspnix.com !
Go to Top of Page

Michael Valentine Jones
Yak DBA Kernel (pronounced Colonel)

7020 Posts

Posted - 2006-09-22 : 10:35:41
The IP address is resolved only once, and after that the IP address is used, so after the initial connection, there is no difference in speed.

The IP addressed is also cached on the client for a while, so additional connections do not need a DNS lookup.

This is not a SQL Server thing. It is just the way DNS works.




CODO ERGO SUM
Go to Top of Page

fabianus76
Posting Yak Master

191 Posts

Posted - 2006-09-22 : 11:04:37
Yes, my colonel !
Got the message :-)

Thanks!
Fabian

my favorit hoster is ASPnix : www.aspnix.com !
Go to Top of Page

afrika
Master Smack Fu Yak Hacker

2706 Posts

Posted - 2006-09-22 : 11:55:03
quote:
Originally posted by Michael Valentine Jones

The IP address is resolved only once, and after that the IP address is used, so after the initial connection, there is no difference in speed.

The IP addressed is also cached on the client for a while, so additional connections do not need a DNS lookup.

This is not a SQL Server thing. It is just the way DNS works.




CODO ERGO SUM



Hi Michael,
i believe what he is asking is for the connection string, which is resolved on the server ?

This is different from the client (browser)

Afrika
Go to Top of Page
   

- Advertisement -