News for hackers. Stuff that matters.
Re:SQLite-on-the-Server Is Misunderstood: Better at Hyper-Sc... by skrebbel on Monday March 03, 2025 @04:28PM (#43247001)
But then any sort of management information, eg "find out how many active customers we have" or "which customer has the most activity" becomes a query over all the DBs. Similarly, admin tools for customer support etc easily become very hard to build. I'd love to know if anybody has a solution for this because otherwise DB-per-tenant sounds very nice indeed.
Re:SQLite-on-the-Server Is Misunderstood: Better at Hyper-Sc... by kgeist on Monday March 03, 2025 @04:54PM (#43247302)
>But then any sort of management information, eg "find out how many active customers we have" or "which customer has the most activity" becomes a query over all the DBs

Create a separate DWH storage where all necessary data from all databases is pulled and processed/aggregated in the background (via change data capture) and saved in a format that is more suitable for analytical queries. The downside is that it requires additional preparation and some upfront design.

>Similarly, admin tools for customer support etc easily become very hard to build.

Our CRM understands the concept of organizations/tenants, so when a customer files a ticket, we know their organization, and from there, for a tech support person, accessing "coolcompany.mysaas.com" is no different from accessing "mysaas.com". In my opinion, it makes tech support easier, because you have far less data/fewer logs to analyze/sift through (only a specific organization's DB) when investigating a problem.

Re:SQLite-on-the-Server Is Misunderstood: Better at Hyper-Sc... by osigurdson on Tuesday March 04, 2025 @12:46AM (#43250801)
I don't think we currently have any solutions that allow you get the answer to any question with optimal performance. You could instead push the needed metrics to a stream during your normal processing and aggregate it. This of course duplicates the data as the same information is already available in the tenant databases but is a very reasonable trade-off.
Re:SQLite-on-the-Server Is Misunderstood: Better at Hyper-Sc... by superq on Tuesday March 04, 2025 @12:31PM (#43257654)
OLAP questions are usually out-of-band and preferably by a tool designed for it (like Clickhouse). Scanning all DB's is something that can be done in the background for most of these use cases.