Re: Fast insert, but slow join and updates for table with 4 billion rows

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: Fast insert, but slow join and updates for table with 4 billion rows
Дата
Msg-id 21210.1477313528@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Fast insert, but slow join and updates for table with 4 billion rows  (Lars Aksel Opsahl <Lars.Opsahl@nibio.no>)
Ответы Re: Fast insert, but slow join and updates for table with 4 billion rows  (Lars Aksel Opsahl <Lars.Opsahl@nibio.no>)
Re: Fast insert, but slow join and updates for table with 4 billion rows  (Lars Aksel Opsahl <Lars.Opsahl@nibio.no>)
Список 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 по дате отправления:

Предыдущее
От: Lars Aksel Opsahl
Дата:
Сообщение: Fast insert, but slow join and updates for table with 4 billion rows
Следующее
От: Lars Aksel Opsahl
Дата:
Сообщение: Re: Fast insert, but slow join and updates for table with 4 billion rows