Re: Joins between foreign tables

Поиск
Список
Период
Сортировка
От Jason Dusek
Тема Re: Joins between foreign tables
Дата
Msg-id CAO3NbwMbmyA9HdnJJ9hrtsbrsgDkzajraXts_y4TyUx_sWwT9A@mail.gmail.com
обсуждение исходный текст
Ответ на Re: Joins between foreign tables  (Geoff Montee <geoff.montee@gmail.com>)
Список pgsql-general

Hi Geoff,

Thanks for your swift reply. Breaking the query up like this would seem to address the problem:

CREATE UNLOGGED TABLE tmp AS
SELECT * FROM table_on_server2WHERE created_at >= date_trunc('day', now());

SELECT email FROM table_on_server1 WHERE id IN (SELECT user_id FROM tmp);

It would stand to reason that the IN list could be pushed down to the foreign server; but this query’s performance is no better than the direct join between table_on_server1 and table_on_server2. Best Regards,

  Jason Dusek

В списке pgsql-general по дате отправления:

Предыдущее
От: Anderson Valadares
Дата:
Сообщение: Re: Momentary Delay
Следующее
От: Ian Barwick
Дата:
Сообщение: Re: Postgresql BDR Replication Setup Issue