Welcome Guest, Not a member yet? Register   Sign In
Best caching for high traffic website
#9

[eluser]boltsabre[/eluser]
And one last thing, look at your DB queries, optimising them can also help greatly!

Stuff like:
Code:
SELECT *
//do you really need to select everything? Most tables have stuff like date created, edited, deleted, ip, etc
// If not, specify only what you need!
SELECT id, topic, user_id,...

Or using a LIMIT 1 where required. If your query should only return 1 item, then put a limit on it!
Forget it though if you are using a WHERE clause on a primary_key, by default they can only be unique, so as soon as it is found the query will exit, but if you are using something like WHERE user_id = $user_id, and the user can only have one record in that table, then yes, put the limit on it!!!

And benchmark your test your joins and stuff. Stuff like making sure you have an index on the "join" columns in both tables.

What about indexes? Do they need rebuilding? Or partitioning your DB/tables?

There is HEAPS you can do to speed up your DB queries, google the topic, it's quiet interesting.


Messages In This Thread
Best caching for high traffic website - by El Forum - 12-20-2012, 04:49 AM
Best caching for high traffic website - by El Forum - 12-20-2012, 07:27 AM
Best caching for high traffic website - by El Forum - 12-20-2012, 07:44 AM
Best caching for high traffic website - by El Forum - 12-20-2012, 08:20 AM
Best caching for high traffic website - by El Forum - 12-20-2012, 08:28 AM
Best caching for high traffic website - by El Forum - 12-20-2012, 08:30 AM
Best caching for high traffic website - by El Forum - 12-20-2012, 08:33 AM
Best caching for high traffic website - by El Forum - 12-20-2012, 08:36 AM
Best caching for high traffic website - by El Forum - 12-20-2012, 08:37 AM



Theme © iAndrew 2016 - Forum software by © MyBB