Per Asher Feldman's suggestion on wikitech-l, truncate DB indexes which hold SHA-1 values, so that the space usage is reduced at the expense of a very small overhead when selecting values that have colliding truncated hashes. Change-Id: I059de4f7bba9a949cf0a93a57df32226c41d8ce0
8 lines
300 B
SQL
8 lines
300 B
SQL
-- Add img_sha1, oi_sha1 and related indexes
|
|
ALTER TABLE /*$wgDBprefix*/image
|
|
ADD COLUMN img_sha1 varbinary(32) NOT NULL default '',
|
|
ADD INDEX img_sha1 (img_sha1(10));
|
|
|
|
ALTER TABLE /*$wgDBprefix*/oldimage
|
|
ADD COLUMN oi_sha1 varbinary(32) NOT NULL default '',
|
|
ADD INDEX oi_sha1 (oi_sha1(10));
|