On Wed, Dec 27, 2023 at 2:23 PM Ranier Vilela wrote:
> ...
>
> Although granule_file has an index as a foreign key, it seems to me that
> it is not being considered.
>
You seem to be mistaken here, a foreign key does not automatically create
an index on the columns, you need to do it by yourself
On Wed, Dec 27, 2023 at 2:11 PM Wilson, Maria Louise (LARC-E301)[RSES] <
m.l.wil...@nasa.gov> wrote:
> 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" co
Index Cond: (id = granule.collection_id)
Buffers: shared hit=12
-> Hash (cost=1.52..1.52 rows=52 width=16) (actual time=0.045..0.045
rows=52 loops=1)
Buckets: 1024 Batches: 1 Memory Usage: 11kB
Buffers: shar
Em qua., 27 de dez. de 2023 às 14:11, Wilson, Maria Louise
(LARC-E301)[RSES] 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 v
t;Wilson, Maria Louise (LARC-E301)[RSES]"
Cc: Frits Hoogland ,
"pgsql-performance@lists.postgresql.org"
Subject: Re: [EXTERNAL] Need help with performance tuning pg12 on linux
CAUTION: This email originated from outside of NASA. Please take care when
clicking links or opening
>
>-> Hash Join (cost=644250.54..10734700.30 rows=22333224
> width=223) (actual time=7864.023..44546.392 rows=22325462 loops=1)
> Hash Cond: (file_1.id = granule_file_1.file_id)
> Buffers: shared hit=780882 read=8345236
>