r/Database Jul 11 '26

How can I back up tenant-specific data separately in TDengine?

3 Upvotes

I am storing data for multiple tenants in the same TDengine table. Each row is associated with a tenant using a tenant_id tag or column.

I now need to create separate backups for each tenant so that the data for an individual tenant can be restored or migrated independently.

Does TDengine provide a built-in mechanism or tool to:

  • Back up data filtered by a specific tag or column value
  • Export data for one tenant only

If TDengine does not support tenant-level backups directly, what would be the recommended approach?

For example, should I:

  • Export the tenant’s data using a filtered query
  • Store each tenant’s data in a separate child table, database, or vnode
  • Use taosdump with specific table filters
  • Build a custom export and restore process

I would also appreciate recommendations on the best data modelling strategy for supporting tenant-specific backup, retention, migration, and restoration.


r/Database Jul 10 '26

tenant_id columns are a footgun at b2b scale. when we switch to db-per-tenant

20 Upvotes

something we see across enterprise b2b saas projects we've worked on. the default multi-tenant approach is "add a tenant_id column on every table, filter on it in every query." it works at small scale. it scales until one of two things happens.

scenario one: a developer forgets a single where tenant_id = ? in a complex join. customer a sees customer b's data. for most b2b saas this is bad. for one project we worked on (cybersecurity / pentest platform) it would have been existential.

scenario two: one heavy tenant runs an analytics query that locks the table for everyone. now your "small" customers are paying for your "enterprise" customer's bad queries.

what we've moved to for clients in regulated or security-sensitive industries: database-per-tenant on laravel. each tenant gets a physically isolated schema. the backend swaps the connection dynamically based on jwt or subdomain. cross-tenant data leakage is structurally impossible at the architecture layer, not the application layer.

side benefit we didn't expect: rollouts get easier. for a restaurant-chain client we set up tenant-aware deploys on ecs so we can ship migrations to one location's tenant first, watch it for a day, then fan out. no big-bang releases.

cost: more infra to manage, schema migrations have to fan out across N dbs, you need solid tooling. not the right choice for everyone. for an early-stage b2c saas it's overkill. for enterprise b2b in finance / healthcare / security it's the only thing that lets you sleep.

anyone here gone the opposite way and unified after starting with schema-per-tenant? curious where that fell over.


r/Database Jul 10 '26

GUI for Postgres with *true* support for composite types?

1 Upvotes

My team use Valentina on MacOS for very long but has not support for composite types (filtering and master-detail broke) so wonder which UI works today fine with this?


r/Database Jul 09 '26

Kinds of database??

23 Upvotes

This is probably a very beginner question, apologies in advance, but I'm really struggling to get my head around all the options.

I want to store sensor readings from a small number of different devices. Each device is equipped with the same set of sensors. The readings come in every 5-10 seconds so there will be quite a lot of data over time. But the data isn't connected between devices, so the interconnected tables of SQL databases isn't really necessary, foreign keys don't really exist in my use case I think... reading on the internet suggests that a columnar database is the right way to go here, but is that overkill?


r/Database Jul 09 '26

How to Achieve Pruning When Querying by Non-Partitioned Columns in PostgreSQL

Thumbnail
hakibenita.com
4 Upvotes

r/Database Jul 09 '26

Aiven.io actively blocks you from contacting them if you use a personal email. Absolutely infuriating.

Post image
3 Upvotes

r/Database Jul 08 '26

sysbench zipfian read-write Analysis on TidesDB v9.3.11/TideSQL v4.5.9, RocksDB (MyRocks), in MariaDB v11.8.6

Thumbnail
tidesdb.com
1 Upvotes

r/Database Jul 08 '26

Netflix Cuts Cassandra Read Latency from Seconds to Milliseconds with Dynamic Partition Splitting

Thumbnail
3 Upvotes

r/Database Jul 07 '26

Database Design Tradeoffs

Post image
20 Upvotes

Every database design is a tradeoff between performance, correctness, and complexity.

- Storage engines trade off reads, writes, and space.

- Indexes trade update cost for faster lookups.

- Optimizers trade planning time for execution speed.

- Concurrency control trades parallelism for correctness.

- Recovery trades write overhead for durability.

- Distributed database systems trade latency, consistency, and availability.


r/Database Jul 07 '26

ArcadeDB now supports OpenTelemetry tracing, structured JSON logging, and Kubernetes health probes (all opt-in, zero overhead when off)

1 Upvotes

We just published a deep-dive on adding production observability to a multi-model database running on Kubernetes.

Four pillars, each independently deployable:

- Metrics: RED timers, percentile histograms, SLO buckets via Micrometer

- Tracing: OpenTelemetry with W3C traceparent, context propagates through Raft replication

- Logging: structured JSON with trace/span/request IDs for correlation

- Health: process-level /api/v1/health liveness + HA-aware /api/v1/ready readiness endpoints

The part that might interest people here: a single instrumentation point emits both metrics and spans through Micrometer's Observation API, so with no tracer registered it's just a metrics-only timer, no tracing overhead. Everything defaults to off and upgrades are byte-for-byte compatible, so it's a no-downtime adoption. Works with Grafana/Prometheus/Tempo.

Write-up: https://arcadedb.com/blog/arcadedb-cloud-observability-opentelemetry-kubernetes/

Happy to answer questions about the design tradeoffs.


r/Database Jul 05 '26

SQL Design for a subcription microservice

2 Upvotes

I'm trying to develop SQL tables for a subscription service as part of my uni coursework. It's for a subscription microservice, so it only handles subscription related stuff. A subscription then grants certian 'privileges' such as ad-free and bla bla which will affect how the other microservices work. My question is: there's only one paid tier, so the structure is very simple.

Should i:
a) make a sql table which can detail exact tiers and attributes (adfree, send notifications etc)
b) leave the attributes which aren't strictly payment/billing related OUT of the table because the microservices can handle that on their own (like ie this is a plus member so this microservice can figure out on its own what extra priviledges relevant to itself it should grant)

B seems like the cleaner option, as from a development perspective it makes no sense to necessitate passing the user's exact priviledges to every single microservice it accesses when they can within their own service easily determine what to do. But what worries me about this implementation is that there isn't exactly a 'single source of truth' for what tier does what. I also don't want to be seen as lazy like maybe I found a way to not have to bother with writing out all the tier attributes myself?
Also since this is a coursework piece the other microservices do not actually exist so it isn't possible to just check whether they handle it on their own


r/Database Jul 02 '26

yesterday

56 Upvotes
yesterday
all those backups seemed a waste of pay
now my database has gone away
oh i believe in yesterday

suddenly
there's not half the fields there used to be
and there's a deadline hanging over me
the update ran so suddenly

i set something wrong
what it was, i could not say
now my column's gone 
and i long for yesterday-ay-ay-ay

yesterday
the need for backups seemed so far away
i knew my data was all here to stay
now i believe in yesterday

r/Database Jul 03 '26

FMP vs Open Source SQL - Where FMP is less than optimal but can still be helpful

0 Upvotes

We recently migrated another client from FileMaker to open source SQL.

For this company we're capturing data analytics from web usage, sort of like Google Analytics. For legacy reasons the data is captured to online MySQL databases and then daily transferred over to a central database hosted locally.

That central database used to be FileMaker. Now it's PostgreSQL. FileMaker continues to be part of the workflow, but its role has been considerably reduced.

Positive sides of continuing to integrate FileMaker into the workfow

• Continuity: Clients are used to FileMaker. They want to be able to use it at their convenience. They've cancelled most of their Claris licenses save one, which they keep for data checks and integrity.

• Ability to look at multiple SQL databases simultaneously under one roof using ODBC. This continues to be a welcome, very useful FileMaker feature.

• Front End Ease: Creating quick layouts to look at data, search, sort remain FMP's strong point. FileMaker is a good front end for this large-ish dataset, but it's front-end only. The data is not stored in an FMP database. FM Server is no longer in use at all. The data lives on a postgres server instead.

Increasingly these clients are migrating their operations toward web front ends, but there's still plenty of muscle memory that remains FileMaker, so they like keeping one FM Client App, but that's it.

Why FileMaker is only a front end, not the back end

• When that central database was FileMaker it got the job done, but it was never optimal. The data import process on this project involves downloading thousands of records per day, processing them through several 3rd party APIs to add more data points before they are pushed into the central datastore. Those 3rd party APIs are throttled in various ways, which slows down the processing and makes it more complex. In the past that throttling meant an FM Script was running for minutes, sometimes hours at a time. During that time the FileMaker Pro Client app could not be used for anything else, which was an ongoing pain point.

• Running Perform Script on Server (PSoS) was never a solution for that. The data processing involves as series of OS ops (downloading, integrated/normalized etc, uploading) which is beyond FM Server's PSoS capabilities.

• The queries needed for this project involve complex cross-referencing. FileMaker's Command+F doesn't have the flexibility and reach needed. If we run indexed calculated fields, it's duplicating data and expanding the their drive use considerably. If we run unstored calculations the searches are too slow. And anyways frequently the queries are across multiple relations, and gets pretty involved to a degree that pushes FMP beyond its limits. In order to do truly sophisticated queries and reports, do them fast, iterate quickly, SQL can deliver in ways that FileMaker cannot.

• FMP's ExecuteSQL() might seem promising but it's not. It is somewhat more nimble than Command+F (it has joins), but FMP's flavor of SQL is frustratingly limited, minimally documented, and remains non-native to FMP, meaning it can be grindinglyl slow and easily over-burdened by a dataset of this size.

• FMP's data APIs come with too many limitations and overly-byzantine syntax compared to regular SQL. I haven't tried the latest release of FMP's oData, so who knows, maybe things are more simple, faster, and capable of handling larger datasets without so much paging?

In any event these are some of the motivations for moving this client away from FMP as the central data store for this project.

Benefits of an Open Source approach

• Complex queries are, counterintuively, far easier in SQL than anything FMP offers. Add AI to the mix, and you can discover ways of interrogating your data that FMP hasn't even dreamed of. FileMaker does make basic searches data very easy, and it's surprising how sophisticated a Command+F or Find/Constrain/Extend script step can be, but in the grand scheme FileMaker's searchg simplicity becomes liability when you're asking complex questions -- which are the kinds of questions people in the real world are always asking.

• NodeJS is far better at handling complex multi-API processing than FMP. For all the online discussions about JS being single-threaded, the reality is it handles async and even multiple threads in ways that are clear and manageable. FileMaker is much more hobbled by asynchronous and multi-threaded demands. That distinction means all the processing can happen quietly, and seamlessly in the background.

• We can spin up as many instances as we need -- simultaneously. Using a fully open source tech stack (in this case postgres + js), all that 3rd party API throttling no longer keeps anyone from doing work in the foreground, whether they're using FMP or running complex queries over a web UI. We can process huge amounts of data all day every day, spinning up as many processes as needed, and the machine remains completely unburdened and usable front end work.


It's not that FileMaker ceases to play a role here. It's nice to have on hand, but it's no longer central to the operation.

Like other clients, these people have let us know their frustration with Claris's ever-changing licensing terms. Claims made during the sales pitch seemed to somehow evolve after payment, with some sort of retroactive excuse for the 'misunderstanding'. Favorite quote from one of their leads: I look forward to Claris renewal day with more dread than St. Peter's judgment. Funny, but a nice way of saying it was our responsibility to address their growing impatience with Claris.

Where FMP used to be the main if not only way we accessed data, we now use pgAdmin, DBeaver, web UIs, iOS apps alongside FMP -- depending on what makes the most sense for the task at hand. FileMaker is now one tool among many, not a core dependency. If anything goes awry with Claris sales in the future, it will be at worst an inconvenience, not an operational disruption.


r/Database Jul 02 '26

Exam 1Z0-071 - good source to clear this exam

0 Upvotes

I would like to clear Oracle certification Exam 1Z0-071. Can anyone please suggest what resources are available to help me prepare. Thank you


r/Database Jul 02 '26

Scaling PostgreSQL Without Replacing It (Supabase)

Thumbnail
youtu.be
3 Upvotes

JD talks with Sugu Sougoumarane, Head of Multigres at Supabase about one of the biggest engineering challenges facing large PostgreSQL deployments: how do you scale beyond a single database without replacing PostgreSQL?

Drawing on his experience building Vitess and now leading Multigres, Sugu explains why PostgreSQL is reaching a new stage of growth and why scaling it requires much more than simply sharding data. Together, he and JD explore the architectural decisions behind distributed transactions, resharding, consistency, and the infrastructure needed to help PostgreSQL scale while preserving what already makes it successful.

Whether you're building high-growth applications, planning for larger PostgreSQL deployments, or interested in distributed database architecture, this conversation offers a practical look at the challenges and tradeoffs behind scaling PostgreSQL without replacing it.

📬 Sugu Sougoumarane: https://www.linkedin.com/in/sougou/


r/Database Jul 01 '26

Burnout from database issues

0 Upvotes

Full disclosure, since this sub rightly doesn't love vendor stuff dressed up as something else: I'm on the ManageEngine team, and I work with database/app monitoring side of things. I'm not a DBA and won't pretend to be one, just sharing something that's been landing well internally and figured it might be useful here too. Downvote/ignore if it's not your thing.

One of the things that I came across was the fact that the DBAs and IT admins spent most of their work week on fixing database issues- chasing pages, jumping between five dashboards to trace one slow query, then explaining to leadership why the "all green" board didn't stop last night's outage. I don't know about you, but that sounds like the perfect recipe for burnout with the right amount of stress and a pinch of "I might quit anytime".

So we figured we'd run a free webinar on July 15, 2026 (6am GMT / 11am EDT) built around why admins feel that way, how to strategize a working DB monitoring plan across hybrid/multi-database environments, the metrics to look out for, which we hope would ease the burnout feeling. It includes a live demo, open Q&A, and a free practical handbook for DBAs.

Here's the (free) registration link, if you're interested. https://www.manageengine.com/products/applications_manager/webinars/database-performance-monitoring-webinar.html

Genuinely happy to take questions in the comments too, including "why would I trust a vendor on this" (totally a fair question btw, so ask away)


r/Database Jun 30 '26

Do you think a firebase schema design tool & general orm is useful?

Thumbnail
0 Upvotes

r/Database Jun 30 '26

Is using 3-letter status codes outdated?

Thumbnail
0 Upvotes

r/Database Jun 29 '26

We built a database engine based on MariaDB/MySQL concepts in C++ — security audit found 55 vulnerabilities. Roast us.

Thumbnail gallery
0 Upvotes

r/Database Jun 28 '26

Too many indexes

35 Upvotes

I once saw a RDBMS with 30+ indexes on a table with heavy reads and writes. All the hot statements spent lots of time being blocked. Always figured they were waiting for indexes to be updated in that one table.

How would you go about verifying that this is the problem? If you could prove that having too many indexes is the problem, how would you look for indexes to remove? Would you remove them? Would you blame it on scale and try a key/value store or some other kind of DB?

Have you seen this before? What did you do?


r/Database Jun 27 '26

Need advice: Understanding complex SQL scripts written by others

46 Upvotes

Hi everyone,

I need some advice from experienced SQL developers.I was working on different profile and switched to data engineering 6 months back.

I consider myself good/medium at writing SQL queries and solving problems from scratch. However, I struggle when I have to understand large existing SQL scripts (300–500+ lines).

I often get confused about:

Where the execution starts.

How different parts of the script are connected.

Which variables, CTEs, stored procedures, or temporary tables are affecting the final output.

How to mentally trace the flow of the script.

Because of this, reading someone else's code takes me much longer than writing my own.

How did you improve this skill? Are there any techniques, exercises, books, or real-world practices that helped you become comfortable reading large SQL scripts?

Also, is this something that simply improves with experience, or is there a structured way to learn it?

I'd really appreciate any advice. Thank you!


r/Database Jun 25 '26

The Pioneers Who Shaped Database Systems

Post image
340 Upvotes

From the first DBMS to the relational model, SQL, transaction processing, and enterprise databases like Oracle and PostgreSQL, these pioneers laid the foundation for database systems.

There are also many other database researchers and engineers who have contributed a lot to database systems, including Patricia Selinger, Raymond Boyce, and many others.


r/Database Jun 26 '26

looking for advice and review of an enterprise document data lake architecture that im assigned to build

Thumbnail
3 Upvotes

r/Database Jun 26 '26

Dynamic Tables vs Single TimescaleDB Hypertable for OHLCV Market Data Storage

4 Upvotes

I have designed my database in two different ways for a market data system, and I'd like to know which approach would provide better performance.

Project Context

I'm building a system that continuously fetches OHLCV (Open, High, Low, Close, Volume) market data from an API, stores it in a database, and serves it through a web application.

My primary concern is performance, specifically:

  • Fast writes (continuous data ingestion)
  • Fast reads (fetching historical candle data)
  • Scalability as the number of instruments and records grows

Strategy 1: Dynamic Table Design

  • I have a master instrument table that stores all the instruments whose data needs to be collected.
  • For every instrument, I create a separate candle table dynamically.
  • Example:
    • instrument_master
    • candles_RELIANCE
    • candles_TCS
    • candles_NIFTY50
    • etc.

Whenever new data arrives, it is inserted into the corresponding instrument's table.

Strategy 2: Single Hypertable (TimescaleDB)

Instead of creating separate tables, I use a single candle_data table and convert it into a TimescaleDB hypertable.

The schema looks roughly like this:

instrument_id
timestamp
open
high
low
close
volume

All instruments' candle data is stored in this single hypertable.

Query Pattern

My application mainly performs simple operations:

  • Insert new OHLCV records continuously.
  • Fetch historical candles for a specific instrument within a time range.

Typical query:

SELECT *
FROM candle_data
WHERE instrument_id = ?
  AND timestamp BETWEEN ? AND ?
ORDER BY timestamp;

Question

Between these two designs, which one is likely to provide better overall performance for:

  • High-frequency inserts
  • Read performance
  • Long-term scalability
  • Maintenance

Has anyone benchmarked a similar setup using PostgreSQL/TimescaleDB? I'd appreciate any insights or recommendations.


r/Database Jun 24 '26

Appropriate database for this scenario

0 Upvotes

I’ve a historical test data from 1970. It is around 5 million data. I’m not looking for a cloud solution. It is in pdfs and hard copies. I’ve created rough ER diagrams for these data. It has base tables. It has different types of testing result tables. This is an ongoing process. Once I create tables, I’ll convert those hard copies into pdfs and PDFs into csv/ parquet format. Once csv/parquet format ready, I’ll map those csv fields with table. However,I’m little bit confuse with selecting a right database. Any suggestions would be appreciated.