문제

I have a list of about 2000 objects (in this case, Teamspeak channels) and I would like to record (to disk) whether they are empty or not, in order to determine which ones are being used.

I'm having trouble solving this since I'm doing 2000 inserts every 10 seconds, and that's thrashing my disk. However I'm sure there must be a better way to do this! I'm just interested in getting a list of unused channels (say, channels that were empty for 2 weeks) to delete later.

Should I be using a relational database? Is there a better way of acomplishing what I want to do?

도움이 되었습니까?

해결책

If you want SQLite to handle that many records, you have to batch them in transactions. See http://sqlite.org/faq.html#q19

But I suspect you don't need to record that much data, if all you want is the information about which channels are empty.

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top