Quote:
|
Originally Posted by jimthefiend
Who the fuck are YOU again?
Did I say I was an expert?
As I recall he didnt ASK about improving speed, he ASKED about improving performance. I would say that increasing connections to prevent errors like:
"Warning: Too many connections in /path/to/blahblahblah/includes/functions/database.php on line 19 Warning: MySQL Connection Failed: Too many connections in /path/to/blahblahblah//includes/functions/database.php on line 19. Unable to connect to database server!"
Qualifies as improving performance. 
|
Why dont i tell you why they WONT improve the speed of the server and possibly make it worse.
Max Connections, if your apps are getting locked out of mysql due to the server not having enough connections chances are that your tables are not properly indexed and thus mysql takes longer to scan the table looking for the results of your query. But lets say you do increase the max connections, o now you got more apps waiting on mysql to run queries which only worsens the problem. Wheres the speed?
Optimizing tables,This *Might* help out but chances are that it will do nothing special for you unless you do lots of deletes in the table. What this command does is re-creates the table with your data minus data blocks marked as deleted but where the data hasnt been purged. Wheres the speed?
Use proper indexes, up some of the buffers (key buffer,read buffer, sort buffer). This all depends on the amount of ram you want mysql to use AND what your max connection setting.
key_buffer_size=134217728
read_buffer_size=16773120
max_used_connections=37
max_connections=150
threads_connected=24
It is possible that mysqld could use up to
key_buffer_size + (read_buffer_size + sort_buffer_size)*max_connections = 3308966 K
Now you see how upping the max connections should be used as a last resort.
like i said, If you dont know what you're talking about then keep your mouth shut