Take the 2-minute tour ×
WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. It's 100% free, no registration required.

I want to know why Wordpress designed their database with two tables separating users and meta from each other. Wouldn't it be better if first_name, last_name, nickname, description, and capabilities are in the wp_users table?

SO what's the advantage for doing this separation?

share|improve this question

1 Answer 1

up vote 2 down vote accepted

The meta table is build to allow custom user meta. If anything would be in just one table a plugin developer had to add a new column to the table for each meta data or the data had to be stored as serialized arrays/objects which would made them unsearchable.

Short: Performance and flexibility.

share|improve this answer
    
thanks very much. will it make my queries faster when the two tables are separated? –  Raymond Jun 7 '12 at 8:36
    
Performance doesn’t depend so much on the number of tables. Indexes and optimized queries are much more important. –  toscho Jun 7 '12 at 8:49
    
i see, okay. thanks –  Raymond Jun 7 '12 at 9:12

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.