Re: Fast insert, but slow join and updates for table with 4 billion rows - Mailing list pgsql-performance

From Tom Lane
Subject Re: Fast insert, but slow join and updates for table with 4 billion rows
Date
Msg-id 21210.1477313528@sss.pgh.pa.us
Whole thread Raw
In response to Fast insert, but slow join and updates for table with 4 billion rows  (Lars Aksel Opsahl <Lars.Opsahl@nibio.no>)
Responses Re: Fast insert, but slow join and updates for table with 4 billion rows
Re: Fast insert, but slow join and updates for table with 4 billion rows
List pgsql-performance
Lars Aksel Opsahl <Lars.Opsahl@nibio.no> writes:
> In this example I have two tables one with 4 billion rows and another with 50000 rows and then I try to do a standard
simplejoin between this two tables and this takes 397391  ms. with this SQL (the query plan is added is further down) 

This particular query would work a lot better if you had an index on
nora_bc25_observation (point_uid_ref, epoch), ie both join columns
in one index.  I get the impression that that ought to be the primary
key of the table, which would be an even stronger reason to have a
unique index on it.

            regards, tom lane


pgsql-performance by date:

Previous
From: Lars Aksel Opsahl
Date:
Subject: Fast insert, but slow join and updates for table with 4 billion rows
Next
From: Lars Aksel Opsahl
Date:
Subject: Re: Fast insert, but slow join and updates for table with 4 billion rows