Make WordPress Core

Opened 18 years ago

Closed 16 years ago

#4013 closed defect (bug) (fixed)

post_ID in schema not consistent across tables

Reported by: charleshooper's profile charleshooper Owned by: charleshooper's profile charleshooper
Milestone: 2.8 Priority: normal
Severity: normal Version: 2.2
Component: Optimization Keywords: has-patch database schema
Focuses: Cc:

Description

Since r5078 the largest possible value for wp_posts.ID due to the cast to int is limited to 2,147,483,647 on most 32-bit platforms. The column for wp_comments.comment_post_ID is also an INT-sized value, as opposed to the BIGINT-sized value in wp_posts. I am recommending we reduce the size of the post_IDs in the schema from BIGINT to INT. Doing so will greatly reduce the table and index size for the tables wp_comments, wp_post2cat, wp_postmeta and is just good practice in regards to efficient database design.

See also #3725.

Attachments (1)

trunk-schema.diff (1.5 KB) - added by charleshooper 18 years ago.
Modifies database schema and bumps db_version

Download all attachments as: .zip

Change History (3)

@charleshooper
18 years ago

Modifies database schema and bumps db_version

#1 @markjaquith
17 years ago

  • Milestone changed from 2.3 to 2.5

#2 @Denis-de-Bernardy
16 years ago

  • Milestone changed from 2.9 to 2.8
  • Resolution set to fixed
  • Status changed from new to closed

fixed in 2.8

Note: See TracTickets for help on using tickets.