Django models, tables in InnoDB

To get Django to output innodb tables in MySQL, you need either

  • display ALL tables as innodb or
  • selectively issue alter table commands

The first is suboptimal (MyISAM is faster for tables with a predominance of queries), and the second is pain and hack-ish.

Are there any other ways?

UPDATE: Adding more clarity to my question - I need my models (or tables) that Django creates initially (using syncdb) to use the INNODB engine (not MyISAM). In my database, I will have some tables in InnoDB and some of MyISAM. How to do it in Django?

+3
source share
1 answer

: http://code.djangoproject.com/wiki/AlterModelOnSyncDB

post_syncdb ALTER SQL . ( , 4 , , Django).

, , . , .

+2

All Articles