Re: [EXTERNAL] Re: Need help with slow query - postgres 12 on linux RHEL 8

From: Matheus de Oliveira <matioli(dot)matheus(at)gmail(dot)com>
To: Ron Johnson <ronljohnsonjr(at)gmail(dot)com>
Cc: "pgsql-admin(at)lists(dot)postgresql(dot)org" <pgsql-admin(at)lists(dot)postgresql(dot)org>
Subject: Re: [EXTERNAL] Re: Need help with slow query - postgres 12 on linux RHEL 8
Date: 2023-12-28 20:17:10
Message-ID: CAJghg4JB-5GH=UOiXtjBsxfVq+Ud2SABww8CiDwLUeKcSox=Ew@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-admin

On Thu, Dec 28, 2023 at 4:42 PM Ron Johnson <ronljohnsonjr(at)gmail(dot)com> wrote:

> On Thu, Dec 28, 2023 at 2:38 PM Matheus de Oliveira <
> matioli(dot)matheus(at)gmail(dot)com> wrote:
> [snip]
>
>> PS: As said in the other thread, a primary key on (granule_uuid, file_id)
>> would make more sense, but you need to get rid of null values on these rows
>> before creating the PK.
>>
>
> Can't you create a unique index index on fields with nulls?
>

Yes, you can create an unique index on fileds with nulls. But not a primary
key, a primary key requires that all fiedls are NOT NULL.

Best regards,
--
Matheus de Oliveira

In response to

Browse pgsql-admin by date

  From Date Subject
Next Message hubert depesz lubaczewski 2023-12-29 08:32:04 Re: [EXTERNAL] Re: Need help with slow query - postgres 12 on linux RHEL 8
Previous Message Wilson, Maria Louise (LARC-E301)[RSES] 2023-12-28 20:16:46 Re: [EXTERNAL] Re: Need help with slow query - postgres 12 on linux RHEL 8