New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Join between foreign tables #153
Comments
It seems that the same kind of issue is stucked since november 2015 (#72) !
|
I am having a similar issue here. I guess when two tables join together, mysql_fdw is pulling two whole tables together? Can anyone look at it please? Thanks |
Join push-down is not implemented yet.
…On Thu, Sep 27, 2018 at 12:00 AM Eugene Wang ***@***.***> wrote:
I am having a similar issue here. I guess when two tables join together,
mysql_fdw is pulling two whole tables together?
Can anyone look at it please? Thanks
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
<#153 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/ADbS8v5-20UevjgcD8W0J3pzlw0YSXLrks5ue860gaJpZM4QdcNi>
.
--
Ibrar Ahmed
|
Thank you for answering. I suggested that Join push-down can be implemented only if source tables of two remote tables are in the same server. |
Hi,
I'm using pg 9.5.7 and mysql_fdw 2.3.0.
When I try to join two foreign tables, it takes a very long time to execute because it doesn't use the indexes on the foreign tables columns.
For example, I run the following query:
SELECT DISTINCT(a.exa) as nb FROM table1 a WHERE site = 'ABC' AND date >= CURRENT_DATE - INTERVAL '30 DAY' AND NOT EXISTS (SELECT 1 FROM table2 b WHERE com = 1234 AND datetime >= CURRENT_DATE - INTERVAL '30 DAY' AND b.nb = a.exa) ORDER BY nb; Temps : 30334.196 ms
As you can see, it takes approximately 30 sec to run.
But if I add a join to get data from another table, I have to stop the query after 30 min, because I still don't get any result !
SELECT DISTINCT(a.exa) as nb, c.otherid FROM table1 a, table3 c WHERE a.col1 = c.col1 AND site = 'ABC' AND date >= CURRENT_DATE - INTERVAL '30 DAY' AND NOT EXISTS (SELECT 1 FROM table2 b WHERE com = 1234 AND datetime >= CURRENT_DATE - INTERVAL '30 DAY' AND b.nb = a.exa) ORDER BY nb
Both columns col1 on table a and c are indexed on mysql side.
| table3 | 0 | PRIMARY | 1 | col1 | A | 188428 | NULL | NULL | | BTREE | | |
| table1 | 1 | col1 | 1 | col1 | A | 369733 | NULL | NULL | | BTREE | | |
The text was updated successfully, but these errors were encountered: