Page 1 of 1
Top 20+ MySQL Best Practices
Posted: Wed Sep 14, 2011 12:11 am
by Ark
This is a top 20+ MySQL tips I found on the web to maximize your querie's speed. A database is a
need in BBG development this tips will help you.
http://net.tutsplus.com/tutorials/other ... practices/
And the same one but in spanish if you prefer:
http://boozox.net/mysql/20-consejos-par ... -conocias/
Salu2!
Re: Top 20+ MySQL Best Practices
Posted: Wed Sep 14, 2011 12:37 am
by Jackolantern
Very good stuff in there! Nice find

Re: Top 20+ MySQL Best Practices
Posted: Wed Sep 14, 2011 12:54 am
by Ark

Thanks!
Hope it can be helpful.
Re: Top 20+ MySQL Best Practices
Posted: Wed Sep 21, 2011 7:43 am
by Callan S.
With the tip on drawing random entries from the database, does that work if you have deleted entries in the database?
I tend to use rand() and I'm thinking I might try and atleast switch to a lower load practice. But on the other hand I'll want to delete ancient registrations, at some point?
Edit: Yeah, I meant this code
Code: Select all
$r = mysql_query("SELECT count(*) FROM user");
$d = mysql_fetch_row($r);
$rand = mt_rand(0,$d[0] - 1);
$r = mysql_query("SELECT username FROM user LIMIT $rand, 1");
It looks like it might be alright?