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 8046403
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 5, 20262026-06-05T05:46:32+00:00 2026-06-05T05:46:32+00:00

Here is a concrete example: WordPress stores user information(meta) in a table called wp_usermeta

  • 0

Here is a concrete example:

WordPress stores user information(meta) in a table called wp_usermeta where you get the meta_key field (ex: first_name) and the meta_value (John)

However, only after 50 or so users, the table already packs about 1219 records.

So, my question is: On a large scale, performance wise, would it be better to have a table with all the meta as a field, or a table like WordPress does with all the meta as a row ?

Indexes are properly set in both cases. There is little to no need of adding new metas. Keep in mind that a table like wp_usermeta must use a text/longtext field type (large footprint) in order to accommodate any type of data that could be entered.

My assumptions are that the WordPress approach is only good when you don’t know what the user might need. Otherwise:

  • retrieving all the meta requires more I/O because the fields aren’t stored in a single row. The field isn’t optimised.
  • You can’t really have an index on the meta_value field without suffering from major drawbacks (indexing a longtext ? unless it’s a partial index…but then, how long?)
  • Soon, your database is cluttered with many rows, cursing your research even for the most precise meta
  • Developer-friendly is absent. You can’t really do a join request to get everything you need and displayed properly.

I may be missing a point though. I’m not a database engineer, and I know only the basics of SQL.

  • 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-05T05:46:34+00:00Added an answer on June 5, 2026 at 5:46 am

    You’re talking about Entity-Attribute-Value.

    - Entity    = User, in your WordPress Example  
    - Attribute = 'First Name', 'Last Name', etc  
    - Value     = 'John', 'Smith', etc  
    

    Such a schema is very good at allowing a dynamic number of Attributes for any given Entity. You don’t need to change the schema to add an Attribute. Depending on the queries, the new attributes can often be used without changing any SQL at all.

    It’s also perfectly fast enough at retrieving those attributes values, provided that you know the Entity and the Attribute that you’re looking for. It’s just a big fancy Key-Value-Pair type of set-up.

    It is, however, not so good where you need to search the records based on the Value contents. Such as, get me all users called 'John Smith'. Trivial to ask in English. Trivial to code against a ‘normal’ table; first_name = 'John' AND last_name = 'Smith'. But non-trivial to write in SQL against EAV, and awful relative performance; (Get all the Johns, then all the Smiths, then intersect them to get Entities that match both.)

    There is a lot said about EAV on-line, so I won’t go in to massive detail here. But a general rule of thumb is: If you can avoid it, you probably should.

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

Sidebar

Related Questions

Here is a concrete example: I create a IWeBrowser2 interface by calling wb.CoCreateInstance(CLSID_InternetExplorer, 0,
Here's a concrete example of what I want to do. Consider the string.Join function.
Here's what my table TheTable looks like ColA | ColB | ColC ------+-------+------ abc
Here's what I am trying to do: The user enters a string. The string
I've tried searching around but there isn't something that is a fairly concrete example
I've got a general question illustrated with a concrete example. How much would you
EDIT: I will leave this here as an example. Read the comments for more
Example 1: <asp:Panel Visible=false runat=server> <asp:TextBox ID=textbox runat=server /> </asp:Panel> Here, textbox.Visible returns false
In scala 2.9.0.RC3, I defined a trait for parsers and a concrete example of
Given a type (Candidate) which has muiltiple fields one may score (here one concrete

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.