Etiquette on these lists is to reply in line or below the relevant portion, not top-post with full quoting like default gmail behavior.
On Wed, Mar 31, 2021 at 9:18 AM Mohan Radhakrishnan <radhakrishnan.mohan@xxxxxxxxx> wrote:
But we don't search using UUIDs always. Only when data from another distributed serviceis received we need them and in such cases we have to join using them.
I haven't used them so I don't recall exactly, but I believe there is a type of UUID generation which has some leading correlation to time which would help with reducing the random I/O issue that Tom Lane mentioned. A quick search of the archive may lead you to that, or someone else may chime in with the name I expect.
But for local data we can identify another composite unique key. Does PostgreSqlcreate a unique index for us ? What about a FK that references this compositeunique key ? Does it create a FK index ?
It is up to you to create whichever fkeys and indexes you require.