News for hackers. Stuff that matters.
Re:Rearchitecting: Redis to SQLite by justinclift on Wednesday September 25, 2024 @09:43AM (#41647454)
Wonder if they had indexes on their SQLite tables?

Not seeing a mention of that in the article.

Re:Rearchitecting: Redis to SQLite by michaelbuckbee on Wednesday September 25, 2024 @09:50AM (#41647538)
The answer is "yes." We had indexes - but it's also a little more complicated than that, as we're storing IPv4 and IPv6 ranges in a single table in a format _designed_ to be indexed a particular way.

In the article, we refer to this as "decimal lexical" formatting, where we're taking the IPs and making them integers but actually treating them as strings. We're doing this in both Redis with sorted sets and then in a single table in SQLite.

I was going to explain all this in the article, but it was too long already, so it will be a future blog post.

Re:Rearchitecting: Redis to SQLite by filleokus on Wednesday September 25, 2024 @10:22AM (#41647873)
Really great article and I really appreciate seeing this "flavour" of "distributed" sqlite, think it can be useful in many no/low-write scenarios.

But about the formatting of the data, is it completely inherent to the rest of the system / unchangeable? Spontaneously I would have guessed that for example a bitfield in redis would have performed better. Did you test any other formattings?

Re:Rearchitecting: Redis to SQLite by epcoa on Wednesday September 25, 2024 @10:50AM (#41648198)
Curious, what is the advantage of decimal? Why not base-64 or some larger and power of 2 base?
Re:Rearchitecting: Redis to SQLite by a12b on Wednesday September 25, 2024 @10:46AM (#41648160)
You should definitely write an article with all tricks you used to make it fast!