Skip to content Skip to sidebar Skip to footer

1 Very Large Table Or 3 Large Table? Mysql Performance

Assume a very large database. A table with 900 million records. Method A: Table: Posts +----------+-------------- +------------------+----------------+ | id (int) | item_id (int) |

Solution 1:

This is actually a discussion about Singe - Table - Inheritance vs. Table Per Class Inheritance and missing out joined inheritance. The former is related to Method A, the second to your Method B and Method C would be as having all IDs of your posts in one table and deferring specific attributes for group or user - posts ijto different tables. Whilst having a big sized table always has its negativ impacts related to table full scans the approach of splitting tables has it's own , too. It depends on how often your application needs to access the whole list of posts vs. only retrieving certain post types. Another consideration you should take into account is data partitioning which can be done with MySQL or Oracle Database e.g. which is a way of organizing your data within tables given opportunities for information lifecycle (which data is accessed when and how often, can part of it be moved and compressed reducing database size and increasing the speed for accessing the left part of the data in the table), which is basically split into three major techniques: Range based partitioning, list based partitioning and hash based partitioning. Other features not so commonly supported related to reducing table sizes are the ones dealing with insert's with timestamp invalidating the inserted data automatically after a certain timeperiod has expired. What indeed is a major application design decision and can boost performance is to distinguish between read and writeaccesses to the database at application level. Consider a MySQL - Backend: Because writeaccesses are obviously more critical to database performance then read accesses you could setup a MySQL - Instance for writing to the database and another one as replicant of this for the readaccesses, though this is also discussable, mainly when it comes to RDT (real time decisions), where absolute consistency of data at any given time is a must. Using object pools as a layer between your application and the database also is a technique to improve application performance though I don't know of existing solutions in the PHP world yet. Oracle Hot Cache is a pretty sophisticated example of it. You could build your own one implemented on top of a in - memory database or using memcache, though.


Post a Comment for "1 Very Large Table Or 3 Large Table? Mysql Performance"