WordPress.org

Make WordPress Core

Opened 5 years ago

Closed 5 years ago

Last modified 5 years ago

#36799 closed feature request (wontfix)

Extra field in wp_posts table

Reported by: selnomeria Owned by:
Milestone: Priority: normal
Severity: normal Version:
Component: Posts, Post Types Keywords:
Focuses: Cc:

Description (last modified by swissspidy)

I had an idea, if there was an extra column in wp_posts database table, so, i could save my different custom_fields into serialized string... so, there won't be a need for get_post_meta() queries, but only $post->extra_fields will include all info...

currently, i myself, use post_content_filtered for this job...

https://wordpress.org/plugins/feature-request/

Change History (3)

#1 @swissspidy
5 years ago

  • Component changed from General to Posts, Post Types
  • Description modified (diff)
  • Summary changed from IDEA ! ! EXTRA-FIELD in WP_POSTS to Extra field in wp_posts table

#2 follow-up: @swissspidy
5 years ago

  • Milestone Awaiting Review deleted
  • Resolution set to wontfix
  • Status changed from new to closed

I don't really see a benefit of adding a new column to wp_posts that badly replicates the postmeta table.

You can't really index such a column in a good way in the database and you also can't order by values in it. Additionally, post meta queries are cached, so performance is not a big concern there. Short, it's not useful.

currently, i myself, use post_content_filtered for this job...

I suggest you to add such a column yourself in your plugin if you really need it. If it's just for performance, you should look into implementing an object cache like Memcached or Redis.

It's not something we'd add in core at this point though.

#3 in reply to: ↑ 2 @selnomeria
5 years ago

Replying to swissspidy:

hm.. Memcached?/ i have never heard it.. now i am reading a tutorial about it and YOU SHOULD TELL EVERYBODY about Memcached! very good stuff! thanks

Note: See TracTickets for help on using tickets.