WordPress.org

Make WordPress Core

Opened 12 years ago

Closed 11 years ago

#3900 closed enhancement (fixed)

New keys for post2cat

Reported by: Xmion Owned by: rob1n
Milestone: 2.3 Priority: normal
Severity: normal Version:
Component: Optimization Keywords: has-patch
Focuses: Cc:

Description

Have you guys seen this, is this something that can improve somewere on wordpress as it does on Lyceum look over at this url, damn hot for lyceum anyway. http://source.ibiblio.org/trac/lyceum/changeset/1012

Attachments (1)

unique_key.diff (1.3 KB) - added by ryan 12 years ago.

Download all attachments as: .zip

Change History (11)

#1 @foolswisdom
12 years ago

  • Milestone changed from 2.1.3 to 2.2

@ryan
12 years ago

#2 @ryan
12 years ago

Looks like we need to change dbDelta to handle the upgrade.

WordPress database error: [Duplicate key name 'link_id']
ALTER TABLE wp_link2cat ADD UNIQUE link_id (link_id,category_id)


WordPress database error: [Duplicate key name 'post_id']
ALTER TABLE wp_post2cat ADD UNIQUE post_id (post_id,category_id)

#3 @ryan
12 years ago

  • Summary changed from Performance of the site to New keys for post2cat

#4 @rob1n
12 years ago

Unless I'm misunderstanding something, wouldn't that force post_id or category_id to be unique? What if a post has more than one category assigned to it, and thus more than one entry in post2cat with the same post_id's?

I'm not great with SQL, so there's probably something I'm missing...

#5 @ryan
12 years ago

The pair has to be unique, so a post can't have the same category more than once in the post2cat table, which would be pointless anyway.

#6 @rob1n
12 years ago

  • Keywords has-patch commit added; Performance removed

Ah. +1 then. Anybody interested in benchmarking the differences?

#7 @rob1n
12 years ago

  • Keywords commit removed
  • Owner changed from anonymous to rob1n
  • Status changed from new to assigned

Working on dbDelta stuff.

#8 @rob1n
12 years ago

  • Milestone changed from 2.2 to 2.3

#9 @rob1n
12 years ago

  • Status changed from assigned to new

#10 @ryan
11 years ago

  • Resolution set to fixed
  • Status changed from new to closed

post2cat is gone in 2.3.

Note: See TracTickets for help on using tickets.