Re:Our site was featured on CNN and Mashable this week. Here...
by danielharan on Saturday February 26, 2011 @09:30PM
(#2267134)
/me shakes head in disbelief
"Index" is by far the big lesson here.
Also, 0.6s is still way too high. What kind of funky join are you doing?
Re:Our site was featured on CNN and Mashable this week. Here...
by wesleyzhao on Saturday February 26, 2011 @10:20PM
(#2267207)
We actually have no joins haha. The support always asked if he had joins but no...I actually don't even know how to do joins. But I hear that Facebook highly encourages not doing joins anyways...so efficient learning?
Re:Our site was featured on CNN and Mashable this week. Here...
by danielharan on Sunday February 27, 2011 @12:46PM
(#2268332)
WTF mate? 0.6s is WAY too high if you're not doing a join. Catch me on IRC if you'd like a hand.
All we did was add a couple intval() calls into our php script and changed the column to big int AND add an index and we had one 30s query go down to 0.6s.
So:
Use ints whenever possible. Index.