Hello! Tell me, please, is it possible to share in the database and tables such as MyISAM and InnoDB? Will there be any problems with this?

    2 answers 2

    Can. Note that transactions and foreign key checks are not distributed to MyISAM.

    Wishes from the Internet:

    • Do not make joint requests for change. It is better to make a request to each type of table separately.
    • Types of related fields must be completely identical.
    • For backup use save to dump. No file copying is fraught with data corruption.
    • Thank you, but I did not understand about the types of related fields - is it about foreign keys? - masha2
    • @Mariya aha - lampa
    • but about joint requests - is it only for a change? Just at once from several tables of different types will not lead to anything bad? - masha2
    • @Mariya, in theory, no :-) - lampa

    In addition, if there is at least one MyISAM table in the database, the main charm of InnoDB is lost: locks in rows, not in tables. Which significantly reduces the performance of the database as a whole.

    If for you the speed of work is not critical and you can afford to make loki tables when reading, then only the above consequences. If you have a heavy load, you should think that InnoDB blocks only the row, and MyISAM - the entire table. Their mix leads to the loss of this refinement by InnoDB.

    • But do not tell me what is considered a big load? We now have a load of 8-10,000 people per day. The entire load is on reading. - masha2
    • but in the future they hope to increase attendance to 100,000 people per day. - masha2
    • just the structure of the data storage in the database is complex, so in some. cases without transactions, when entering information through the admin panel is not enough. Initially, the entire database was MyISAM, and only to preserve data integrity in case of failure, for example, during data entry, I decided to convert part of the tables into InnoDB so that you can use transactions. - masha2
    • It turns out that if we have almost no load on entering information, and transactions are needed only there, then there will be no loss in speed if there are 2 types of tables in the database? - masha2