开发者

Full text Search on MySql table ( Innodb vs ISAM)

开发者 https://www.devze.com 2023-01-26 20:29 出处:网络
I am designing a web application using Mysql as the back end - and am using INNodb tables for maintaining foreign key relationships.

I am designing a web application using Mysql as the back end - and am using INNodb tables for maintaining foreign key relationships.

Now I have this table video which has a column tags which will contain keywords on which I need to perform search. Now since this table is Innodb I cannot use the fulltext search capability of Mysql.

开发者_开发知识库

Now rather than changing the video table to MyIsam and breaking all the foreign key constraints - I was thinking of creating another table called video_tags of type MyIsam which will contain the tags column and the video_id (primary key of the video table).

So in my database all the tables would be Innodb except the video_tags table. Is this the right way to handle this. Thanks for your advice.


The only problem you may encounter is that MyISAM tables does NOT support transactions. So, if you start transaction, write data to InnoDB and MyISAM tables, then roll it back, changes to INNODB will be rolled back, but changes to MyISAM will not.

Also you can consider using something like Sphinx for searches.


I think it is okay doing it like that. I don't see you having problems in the future

0

精彩评论

暂无评论...
验证码 换一张
取 消