[wp-hackers] Meta tables: Take 5

mikeschinkel at newclarity.net mikeschinkel at newclarity.net
Fri Jul 24 17:32:57 UTC 2009

The speedup you'd get from moving to comment meta would be trivial,  
and the potential performance reduction for sites that use that info  
could be substantial. I would not move it. It could also harm backward  

Sent from my iPhone

On Jul 24, 2009, at 1:06 PM, Otto <otto at ottodestruct.com> wrote:

> On Fri, Jul 24, 2009 at 5:21 AM, scribu<scribu at gmail.com> wrote:
>> - WP core shouldn't create tables that it doesn't use. The same  
>> principle is
>> applied to bundled javascript and php classes.
> I agree with this. However, there's several things that the core could
> be putting into a comment meta table. A lot of the lesser used columns
> could be moved to meta data and this speed up comments retrieval
> (probably by a trivial amount, but hey).
> Check out the comments table schema:
>  comment_ID bigint(20) unsigned NOT NULL auto_increment,
>  comment_post_ID bigint(20) unsigned NOT NULL default '0',
>  comment_author tinytext NOT NULL,
>  comment_author_email varchar(100) NOT NULL default '',
>  comment_author_url varchar(200) NOT NULL default '',
>  comment_author_IP varchar(100) NOT NULL default '',
>  comment_date datetime NOT NULL default '0000-00-00 00:00:00',
>  comment_date_gmt datetime NOT NULL default '0000-00-00 00:00:00',
>  comment_content text NOT NULL,
>  comment_karma int(11) NOT NULL default '0',
>  comment_approved varchar(20) NOT NULL default '1',
>  comment_agent varchar(255) NOT NULL default '',
>  comment_type varchar(20) NOT NULL default '',
>  comment_parent bigint(20) unsigned NOT NULL default '0',
>  user_id bigint(20) unsigned NOT NULL default '0',
> Is the author IP critical information that is used a lot? How about
> the agent? And WTF is karma?
> Yes, we need comment meta for plugins. But we could just as easily
> move some of this stuff in there too, perhaps even expanding the core
> functionality a bit in the process.
> -Otto
> _______________________________________________
> wp-hackers mailing list
> wp-hackers at lists.automattic.com
> http://lists.automattic.com/mailman/listinfo/wp-hackers

More information about the wp-hackers mailing list