Do parallel queries work with only dblink not with fdw?
От | Klaus P. |
---|---|
Тема | Do parallel queries work with only dblink not with fdw? |
Дата | |
Msg-id | CAGZW8jUP61bf2bEdmgL827vq=Nt93MFE4YQqjHM=CCyKF95=Xg@mail.gmail.com обсуждение исходный текст |
Ответы |
Re: Do parallel queries work with only dblink not with fdw?
Re: Do parallel queries work with only dblink not with fdw? |
Список | pgsql-general |
In order to improve cpu and disk utilization, I am testing parallel queries.
The approach with dblink_send_query() and dblink_get_result() works in my proof-of-concept. Runtime of my reference query was reduced from 55 seconds to ~20seconds using 4 parallel connections. Not what I had hoped but certainly a significant improvement.
The approach with dblink_send_query() and dblink_get_result() works in my proof-of-concept. Runtime of my reference query was reduced from 55 seconds to ~20seconds using 4 parallel connections. Not what I had hoped but certainly a significant improvement.
My approach is fairly easy:
db_link_send_query('conn1', 'statement based on partitioning field');
db_link_send_query('conn2', 'statement based on partitioning field');
...
db_link_send_query('conn2', 'statement based on partitioning field');
...
SELECT
dblink_get_result('conn1')
dblink_get_result('conn1')
UNION ALL
dblink_get_result('conn2')
...
dblink_get_result('conn2')
...
SELECT * FROM myFdwTable WHERE (clause based on partitioning field)
...
В списке pgsql-general по дате отправления: