by Quade » Mon Mar 30, 2020 11:32 am
I could but I doubt you'd get the speed benefit you think you would. First the way Newsbin does header storage is "a database per group" so, it's not like there's a single monolithic Sqlite file that contains all the records. The reason I do it that way is so that corruption in one group database file doesn't trash all the groups.
What's causing database issues today with the groups, is that some groups simply don't work for headers anymore. The posters are posting randomly named chunks of posts with no organization so, each chunk 750k post of a file is a single entry in the database.
The way it works in a proper groups is:
20000 Posts-> 30 Files-> 1 Group of Files - single entry in the database.
With the new postings it's:
20000 Posts->Single Entry in the database per post.
So the database is getting flooded with garbage posts. If you load a group and see a bunch of random 300-700K posts, that's what I'm talking about. I'm working on a new beta which will simply drop these random posts before before they hit the database.
I've toyed with the idea of adding MySQL support since, I already have code that supports MySQL. In my experiments though, it's really not much if any faster than local Sqlite database for regular files.