I have a Postgres database with about 35 tables of varying sizes. Every table has an auto incrementing integer primary key, as well as a column of native Postgres
uuid
data type recording Version 4 UUID values.
The application code logs UUIDs, but...alas...doesn't always log the object type or table.
While we're working on cleaning that up, we sometimes just want to figure out what row a UUID refers to.
Is there a reasonable strategy to create a view, index, or even full on table to efficiently find a row given a UUID, if every row in the database has a UUID? Or am I chasing an antipattern and should solve it at the application level?
Asked by Christian Carter
(121 rep)
Mar 3, 2018, 06:58 PM
Last activity: Dec 14, 2023, 03:00 AM
Last activity: Dec 14, 2023, 03:00 AM