forked from shaba/openuds
Removed optimizes (nonsense with innodb)
This commit is contained in:
parent
6156f2c6f6
commit
a288dd4df3
@ -71,9 +71,6 @@ class StatsManager(object):
|
||||
# Newer Django versions (at least 1.7) does this deletions as it must (executes a DELETE FROM ... WHERE...)
|
||||
model.objects.filter(stamp__lt=minTime).delete()
|
||||
|
||||
# Optimize mysql tables after deletions
|
||||
optimizeTable(model._meta.db_table)
|
||||
|
||||
# Counter stats
|
||||
def addCounter(self, owner_type, owner_id, counterType, counterValue, stamp=None):
|
||||
'''
|
||||
|
@ -86,10 +86,6 @@ def getSqlDatetime(unix=False):
|
||||
|
||||
def optimizeTable(dbTable):
|
||||
'''
|
||||
Executes table optimization
|
||||
Supported only on mysql right now
|
||||
Legacy method, does nothing actually
|
||||
'''
|
||||
cursor = connection.cursor()
|
||||
|
||||
if connection.vendor == 'mysql':
|
||||
cursor.execute('OPTIMIZE TABLE {0}'.format(dbTable))
|
||||
pass
|
||||
|
Loading…
x
Reference in New Issue
Block a user