How to force django to use MYISAM storage engine when creating database using syncdb command? This page does not help much to shed light in this issue.
MYISAM is the perfect choice since the database is almost only used for reading and MYISAM is significantly faster that InnoDB. There are still some models.ForeignKey fields in the model, but they are only being used to create master detail admin pages. There is not need of having the actual foreign keys in the database.
See this page. Using an OPTIONS
variable in your DATABASES
setting should do the trick, but migrating an existing database to a new engine isn't so easy (think you'd have to re-initialize).
DATABASES = {
'default': {
'ENGINE': 'django.db.backends.mysql',
'NAME': '',
'USER': '',
'PASSWORD': '',
'OPTIONS': {
"init_command": "SET storage_engine=MYISAM",
}
}
}
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With