Re: Named pipe vs TCP/IP speed

2003-08-23 Thread Jakob Dölling
Hi:
 
 This surprised me! I have been connecting with named pipes (and telling
 others to do the same) on Win2k since I discovered them, because my queries
 (and time to connect) are most definitely *faster*. The client/server
 communication is about 25-30% slower using TCP/IP. Example: a simple SELECT
 COUNT(*) FROM table takes 0.3ms with TCP/IP compared to only 0.16ms with
 named pipes. Or, on a more complicated query, 2ms vs 1.5.

Just being curios: How is possible to change the connection type? Do I need
to compile MySQL?
Thanks,

Jakob
^-- 
To Unix or not to Unix. That is the question whether 'tis nobler in the
mind to suffer slings and arrows of vast documentation or to take arms
against a sea of buggy OS and by raping the support lines end then?
;

Contact:
\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/
 \/Jakob Dölling \/EMail: mailto:[EMAIL PROTECTED]/
 Treuerzipfel 13   ICQ #: 47326203 
 /\D-38678 Clausthal /\SMS #: +49-82668-8918663/\
/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\
 /\Webmaster of http://www.bank-ic.de/ /\
 \/\/

-- 
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]



Re: Named pipe vs TCP/IP speed

2003-08-23 Thread Matt W
- Original Message -
From: Jakob Dölling

 Hi:

  This surprised me! I have been connecting with named pipes (and
telling
  others to do the same) on Win2k since I discovered them, because my
queries
  (and time to connect) are most definitely *faster*. The
client/server
  communication is about 25-30% slower using TCP/IP. Example: a simple
SELECT
  COUNT(*) FROM table takes 0.3ms with TCP/IP compared to only 0.16ms
with
  named pipes. Or, on a more complicated query, 2ms vs 1.5.

 Just being curios: How is possible to change the connection type? Do I
need
 to compile MySQL?

First, you need to enable named pipes with enable-named-pipe in the
[mysqld] section of my.ini. Then, just don't use 'localhost' (which uses
TCP/IP on Windows) as the hostname in mysql_connect(). :-) Using '.'
(just a period) specifies named pipes. But by using a blank/empty string
for hostname, named pipes will be used if available, else TCP/IP.

Note that 'localhost' on *nix is special and doesn't use TCP/IP, but the
faster Unix sockets. But again, by just leaving the hostname blank, this
will be used anyway.

So I just leave the hostname blank when MySQL is on the local system to
get the best connection available. It seems that an address is only
needed to connect to a separate MySQL box.

See also the first 2 paragraphs here in the manual:
http://www.mysql.com/doc/en/Can_not_connect_to_server.html

Hope that helps.

Matt


-- 
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]



Named pipe vs TCP/IP speed

2003-08-22 Thread Matt W
Hi all,

I just noticed this in the manual yesterday:
http://www.mysql.com/doc/en/Windows_running.html

MySQL supports TCP/IP on all Windows platforms. The mysqld-nt and
mysql-max-nt servers support named pipes on NT, 2000, and XP. The default is
to use TCP/IP regardless of the platform, because named pipes are actually
*slower* than TCP/IP ...

This surprised me! I have been connecting with named pipes (and telling
others to do the same) on Win2k since I discovered them, because my queries
(and time to connect) are most definitely *faster*. The client/server
communication is about 25-30% slower using TCP/IP. Example: a simple SELECT
COUNT(*) FROM table takes 0.3ms with TCP/IP compared to only 0.16ms with
named pipes. Or, on a more complicated query, 2ms vs 1.5.

Speed differences seem comparable to Unix sockets vs TCP/IP on *nix.

Should the manual info be the other way around? If not, then why am I seeing
it that way? ;-) Any comments?

Matt


-- 
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]