Re: [EXTERNAL] Need help with performance tuning pg12 on linux

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Em qua., 27 de dez. de 2023 às 14:11, Wilson, Maria Louise (LARC-E301)[RSES] <m.l.wilson@xxxxxxxx> escreveu:

Thanks for the reply!!  Having some issues due to nulls….  Any other thoughts?

 

i=# ALTER TABLE granule_file ADD PRIMARY KEY (granule_uuid, file_id);

ERROR:  column "granule_uuid" contains null values

Well, uuid is a bad datatype for primary keys.
If possible in the long run, consider replacing them with bigint.

Can you try a index:
CREATE INDEX granule_file_file_id_key ON granule_file USING btree(file_id);

Although granule_file has an index as a foreign key, it seems to me that it is not being considered.

My 2cents.

Best regards,
Ranier Vilela

[Postgresql General]     [Postgresql PHP]     [PHP Users]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Yosemite]

  Powered by Linux