RE: Reusing connections.
I am using php as my programming language. Let me clarify my post. When I say 'doing a connect', I am talking about the mysql_connect statement not some tcp/ip thing done before the mysql server. -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Sent: Friday, March 10, 2006 2:24 PM To: [EMAIL PROTECTED] Cc: Mysql Subject: Re: Reusing connections. fbsd_user [EMAIL PROTECTED] wrote on 03/10/2006 02:18:49 PM: In my reading of mysql tutorials I see many examples of mysql access with out first doing a connect. Comments say something about reusing open connections for faster processing and less resources usage overhead. What are they talking about what code do I need to make this happen? You first need to tell us which of several dozen languages you are programming with. We can't read your mind. ;-) Shawn Green Database Administrator Unimin Corporation - Spruce Pine -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]
Re: Reusing connections.
fbsd_user [EMAIL PROTECTED] wrote on 03/10/2006 02:18:49 PM: In my reading of mysql tutorials I see many examples of mysql access with out first doing a connect. Comments say something about reusing open connections for faster processing and less resources usage overhead. What are they talking about what code do I need to make this happen? You first need to tell us which of several dozen languages you are programming with. We can't read your mind. ;-) Shawn Green Database Administrator Unimin Corporation - Spruce Pine
Re: Reusing connections.
once a client connects to the server, mysql opens a (TCP/IP or Socket) connection for the client, but after it has serviced the client , mysql still keeps the connection open (thread is in sleep state) for some time depending on the variable wait_timeout value anticipating more requests from the client, so if within that time the client tries to issue a query to the server, it doesn't have to open up a new connection , it will be serviced usng the same connection, thus saving valuable server resources . You don't have to do anyhting special for this to happen, just set wait_timeout to a value that best fits your needs Hope this clarifies your question .. Kishore Jalleda On 3/10/06, fbsd_user [EMAIL PROTECTED] wrote: In my reading of mysql tutorials I see many examples of mysql access with out first doing a connect. Comments say something about reusing open connections for faster processing and less resources usage overhead. What are they talking about what code do I need to make this happen? -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]