brianbroderick / lantern

Shine a light on your PG query logs. The project is being reimagined and is now a WIP.
Apache License 2.0
2 stars 0 forks source link

Repo: Database UID #20

Open brianbroderick opened 4 months ago

brianbroderick commented 4 months ago

The different database tables should understand which database the query originated from; however, it gets complicated with sharded databases because each shard should have an identical schema and be part of a whole.

If we base the UID on the exact name of the database, each shard will have a different calculated UUID, and this becomes an issue when trying to group by the database when we want an aggregate of all shards.

Possible solutions could be to use a database prefix such as "shard_1", "shard_2" would have a prefix of "shard."

brianbroderick commented 2 months ago

Instead of prefixes, we should have a many-to-many for databases to the object (tables, etc)