Best Storage Strategy for Performance and Scalability?

Support MB Custom Table Best Storage Strategy for Performance and Scalability?

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #9978
    MauroMauro
    Participant

    What is the best storage strategy for scalability?
    Performance-wise I would think that a flat table is the fastest way for MySQL to access data, even if some fields in the record might be empty. It will likely take more disk space, but it should be faster to query. Is my assumption correct?

    If this is true, then I should create one flat table with all my custom fields in an unserialised fashion (so that I can also quickly do searches using meta-queries), so that each post has 1 record in this custom table with all custom fields, independently of its post type.

    Thoughts?

    #9980
    Anh TranAnh Tran
    Keymaster

    Yes, that's true.

    Using flat-table helps you query against the value quicky, in case you want to access the data directly from SQL or via PHPMyAdmin. And when writing PHP code, you don't need to parse the array to get the value. This is also the standard way to store value. The serialized array is the special way WordPress uses to handle for its arrays.

    #10002
    MauroMauro
    Participant

    OK, so I'll create a flat table for my custom fields. But will this also work with repeatable/clone-able groups?

    I would like o avoid serialised arrays, and just found out that my initial implementation in Alchemy has stored all my data that way.

    #10024
    Anh TranAnh Tran
    Keymaster

    If you're going to use cloneable groups, then the data is always saved as serialized arrays. The flat table is compatible for only non-cloneable fields.

Viewing 4 posts - 1 through 4 (of 4 total)
  • The topic ‘Best Storage Strategy for Performance and Scalability?’ is closed to new replies.