Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8079433
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 5, 20262026-06-05T16:05:54+00:00 2026-06-05T16:05:54+00:00

WordPress’s datamodel provides extensibility through it’s meta tables (aka, wp_postmeta, wp_commentmeta, wp_usermeta). This name/value

  • 0

WordPress’s datamodel provides extensibility through it’s “meta” tables (aka, wp_postmeta, wp_commentmeta, wp_usermeta). This name/value pair linking is extremely flexible and supported by WordPress’s API. All good reasons to celebrate it but it also can get quite non-performant if you have lots of extension attributes hanging off of your transactions. Let’s say, for instance, that I have a Custom Post Type called “Blood Test” and I want it to be able to capture 30-40 different measurements coming out of the blood analysis. Is it practical to use this wp_postmeta joining for each test? Probably not.

I could go completely bespoke and build tables left and right but what I’m wondering is, is there not a way to at least build an “80/20 rule” and have a generic extension table that provides a static number of additional columns to put SQL-searchable attributes and then end with a column for a JSON object that would allow for non-SQL searchable attributes to extend to an almost unlimited amount? Something like what is diagrammed below:

comparing the two models

I was thinking that by doing this one could also extend the WordPress API so that most development could largely be ignorant of this structural difference. Something like this:

EXAMPLE OF REGISTRATION API:

$my_meta_ext = new WP_Meta_Extension( 'post' );
$my_meta_ext->add_tran_type( 'blood-measurement' , ( 'col1' => 'total-cholesterol' , 'col2' => 
'triglycerides', 'col3' => 'etc');

EXAMPLE OF USAGE API:

add_ext_meta ( $term_id, 'blood-measurement.total-cholesterol', $meta_value );

Ok, so here are my explicit questions for the group:

  1. Does this make sense? Do you see value in this? Does anything like this already exist in a ‘plugin’ form (or otherwise)?
  2. If you were to use one extension table across all types (aka, posts, comments, users, etc.) would you be able to build an index in mySQL that was efficient? Is it better just to have a table per type?
  3. Does anyone have any metrics — even if they’re not fully proven out — on when the default wordpress extension model starts to degrade in performance?
  4. If you’ve done something like this already … any key lessons learned when extending the model? How complicated of a task is this?
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-05T16:05:55+00:00Added an answer on June 5, 2026 at 4:05 pm

    I brought this topic into a specialist WordPress working group in London and while we didn’t arrive on an answer there was pretty clear agreement that this type of solution would be highly valuable. Furthermore, I have decided to start a GIT repository with the intent of developing a plugin to address this (hopefully with the generous support of the group in London or any of you who are reading this and feel you could help).

    The repository can be found here:

    https://bitbucket.org/ksnyder/wp-database-extension/

    Please understand that at this moment there is really just an idea, a high-level design, an interface spec, but no real code. That will change of course and it will change more quickly if you’re willing to help us with this endeavour (mind you I have no personal experience running distributed development but you have to learn somewhere).

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Wordpress, for example, has a table with name => value rows for storing application-wide
Wordpress translation calls for a [theme name].po file, in which are your key value
My wordpress site has been hacked. Through this program: http://sitecheck.sucuri.net/ (...) i found that
The Wordpress database structure looks like this: wp_users (ID, user_registered, etc) wp_usermeta (user_id, meta_key,
WordPress allows theme designers to place a 404.php file in their theme's directory. This
Wordpress has a filter that automatically add paragraphs to posts. I can remove this
Querying wordpress posts according to their tags can look like this (if I pieced
Wordpress uses friendly seo url without using htaccess. Can any explain this to me
Wordpress has this nice function update_option() . it is a nice way to store
WordPress spits posts in this format: <h2>Some header</h> <p>First paragraph of the post</p> <p>Second

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.