🏒 Lucian Marin I will definitely use Redis for my next project. I don't want to touch a database any longer. Sublevel will remain my only SQL oriented project. I will rather build complex structures and change them using procedures than figuring out that's the best path to access data using SQL. You can find a great introduction to Redis at matt.sh/what-is-redis written by Matt Stancliff.
Haaktu I'm wondering what lead to this decision. I'm partial to non-SQL (or is it noSQL) solutions for my personal projects.
5y, 39w 5 replies
🏒 Lucian Marin SQL is the main bottleneck on Sublevel. Instead of planning new features, I'm tweaking the Postgres query planner. It's very hard to maintain a certain level of performance with SQL. Let's say you want all requests to be loaded in exact same amount of time. You can't do that. Each SQL query is different and they might behave differently under heavy load. I doubt NoSQL is any different. That's why a key-value store like Redis is perfect for high performance applications. You know in advance what's the performance for each value stored, so you can plan features as you write code.
5y, 39w 4 replies
Jonah George Out of curiosity, what sort of queries are the primary bottleneck?
5y, 38w 1 reply
Login or register your account to reply
🏒 Lucian Marin count(*) on all pages that need pagination. Limiting to 50 items is a few times faster. Also, the slowest query is in the Following tab from Activity because I have to exclude lots of things. I can't create a special index for it because data that needs to be excluded is in different tables. In the Current tab I used an index for the where condition and that works nicely.
5y, 38w reply