Ticket #3900 (closed enhancement: fixed)

Opened 2 years ago

Last modified 1 year ago

New keys for post2cat

Reported by: Xmion Assigned to: rob1n
Priority: normal Milestone: 2.3
Component: Optimization Version:
Severity: normal Keywords: has-patch
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

unique_key.diff (1.3 kB) - added by ryan on 03/05/07 15:22:41.

Change History

03/03/07 17:11:04 changed by foolswisdom

  • milestone changed from 2.1.3 to 2.2.

03/05/07 15:22:41 changed by ryan

  • attachment unique_key.diff added.

03/05/07 15:24:02 changed by ryan

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)

03/07/07 00:23:11 changed by ryan

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

03/11/07 00:46:00 changed by rob1n

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...

03/11/07 01:49:24 changed by ryan

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.

03/13/07 03:55:54 changed by rob1n

  • keywords changed from Performance to has-patch commit.

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

03/13/07 04:05:30 changed by rob1n

  • keywords changed from has-patch commit to has-patch.
  • owner changed from anonymous to rob1n.
  • status changed from new to assigned.

Working on dbDelta stuff.

04/04/07 01:26:13 changed by rob1n

  • milestone changed from 2.2 to 2.3.

04/25/07 02:33:36 changed by rob1n

  • status changed from assigned to new.

08/14/07 03:05:39 changed by ryan

  • status changed from new to closed.
  • resolution set to fixed.

post2cat is gone in 2.3.