Storing usermeta inside custom table

Support MB User Meta Storing usermeta inside custom tableResolved

Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #33256
    Nicholas CoxNicholas Cox
    Participant

    Hi

    I have been lookign through my database structure and I use custom tables for post types etc and all of the tables are tidy except the usermeta table. Now I know the usermeta is required but is there a way to take all of the meta and put them in one row in a custom table? e.g. admin_color

    so to change all rows of meta to be stored into one row in a custom table.
    usermeta-table

    e.g.
    ID | nickname | first_name | last_name | description | rich_editing | ........
    1 | example | Alex | Yeates | test | true | ........

    #33266
    Long NguyenLong Nguyen
    Moderator

    Hi,

    Is there a way to take all of the meta and put them in one row in a custom table?

    It is possible to save all user meta to the custom table, but you have to create many codes/functions to return the value for the WordPress functions when a theme or another plugin retrieves the user meta. So I do not see the benefit when you save the default user meta to the custom table.

    #33273
    Nicholas CoxNicholas Cox
    Participant

    Hi,

    yes that's correct. I wanted to do this as my website will have up to 10,000 users and the table will grow quickly. So I wanted to combine them to reduce the number of rows inside user table. Metabox main focus is to reduce the number of table rows inside posts, so I thought that there might be some optimisation for the user table too. Seems like it can grow and become bloated very quickly. To have e.g. 20 rows for 1 user is very excessive.

Viewing 3 posts - 1 through 3 (of 3 total)
  • You must be logged in to reply to this topic.