While profiling a site for release I noticed that the clipper queries where not grabbing from indexed fields and there was no primary key but instead an index. This new schema improves the tables flexibility for effecient joins and searching as more relationships are stored.

I don't have any benchmarks to show any improvements gained by this. However indexing int values is cheap and all our queries are "WHERE *_id = %d" so indexing makes sense here. And db theory says that in most cases you should have a primary key. And since that's how rid is being used we might as we make it the pkey.

CommentFileSizeAuthor
#1 766101.57 KBneclimdul
clipper_schema_update1.56 KBneclimdul

Comments

neclimdul’s picture

StatusFileSize
new1.57 KB

woops, my update wasn't 100%. it worked but displayed incorrectly. Here's the fix.

Bèr Kessels’s picture

Status: Needs review » Fixed

Comitted to HEAD. Thanks a lot!

Anonymous’s picture

Status: Fixed » Closed (fixed)