[wp-trac] Re: [WordPress Trac] #787: Bad PRIMARY key for the table wp_post2cat

WordPress Trac wp-trac at lists.automattic.com
Thu Mar 8 12:02:34 GMT 2007


#787: Bad PRIMARY key for the table wp_post2cat
--------------------------------------+-------------------------------------
 Reporter:  michel v                  |        Owner:  ketsugi
     Type:  defect                    |       Status:  new    
 Priority:  normal                    |    Milestone:  2.2    
Component:  Optimization              |      Version:  2.1    
 Severity:  normal                    |   Resolution:         
 Keywords:  dev-feedback 2nd-opinion  |  
--------------------------------------+-------------------------------------
Comment (by DD32):

 ''Wouldn't setting both post_id and category_id as PRIMARY's force them to
 be unique?''[[BR]]
 Not if they're added as a tuple, ie a pair. The primary key would be a
 combination of post_id AND category_id.[[BR]]
 I'm not sure myself if it'd be more optimized that way, or if it was a
 single index on either.

-- 
Ticket URL: <http://trac.wordpress.org/ticket/787#comment:8>
WordPress Trac <http://trac.wordpress.org/>
WordPress blogging software


More information about the wp-trac mailing list