Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>First, i will <em>REALLY</em> try to avoid your approach. I look at it as the "last chance" to avoid performance issues.</p> <p>You have alternatives (from hardware to software) on hard you can buy Fusion i/o or just an SSD drive (<a href="http://www.mysqlperformanceblog.com/2009/05/01/raid-vs-ssd-vs-fusionio/" rel="nofollow">Raid vs SSD vs FusionIO</a>). But, you can solve this using software and dont investing money at all. On your scenario you should use cache (i.e. <a href="http://memcached.org/" rel="nofollow">memcached</a>) if you aren't already using it. <a href="http://dev.mysql.com/doc/refman/5.1/en/partitioning.html" rel="nofollow">MySQL have partitioning</a>, its not the best choice in the world but, you can have some good performance increase.</p> <p>BUT, if you go with your idea, i suggest that you <em>shard</em> your data, using a value that split your data across tables more <em>balanced</em>. You can do something nasty like: create 50 tables like thread_0 to thread_49 And then (forumid % 50) so you land on one of this 50 tables. That way you avoid to create a table everytime you create a forum, and you avoid to have N tables. And the select with forum_id indexed will be very fast. Also <strong>you can have some sort of logic on the app to manage pagination, and avoid huge offsets</strong>.</p> <p>Good luck!</p> <p>PS: I add a blogpost on MysqlPerfomanceBlog <a href="http://www.mysqlperformanceblog.com/2009/08/06/why-you-dont-want-to-shard/" rel="nofollow">"Why you dont want to shard"</a></p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
    2. VO
      singulars
      1. This table or related slice is empty.
    3. VO
      singulars
      1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload