"On a Youtube-like website, would it make sense to use individual sqlite files to store vi开发者_运维知识库deo comments? (One sqlite file per video.)"
I'm curious to hear what anyone thinks.
The reopening of so many files and file handles at the OS level may cause a performance hit. I would let the database do what databases do best and just have a FK to the video ID for each comment.
As you've stated in the comments that you already have a MySQL database for videos, there's little sense in using SQLite for commenting. A comments table with a video_id column is going to be a lot more flexible.
SQLite also doesn't hold up too well in a situation where you might have concurrent writes, which commenting is.
It would make it impossible (or very difficult) to efficiently search all comments.
精彩评论