[IMP] base: remove unused index

On database with 5 million attachaments, the index of checksum is 250 Mo, but this field is never used to search.

closes odoo/odoo#106253

Signed-off-by: Raphael Collet <rco@odoo.com>
This commit is contained in:
Florent de Labarre
2022-11-24 13:28:44 +01:00
committed by GitHub
parent b603cde02d
commit 1f3cda12bd
+1 -1
View File
@@ -412,7 +412,7 @@ class IrAttachment(models.Model):
db_datas = fields.Binary('Database Data', attachment=False)
store_fname = fields.Char('Stored Filename', index=True, unaccent=False)
file_size = fields.Integer('File Size', readonly=True)
checksum = fields.Char("Checksum/SHA1", size=40, index=True, readonly=True)
checksum = fields.Char("Checksum/SHA1", size=40, readonly=True)
mimetype = fields.Char('Mime Type', readonly=True)
index_content = fields.Text('Indexed Content', readonly=True, prefetch=False)