-
Notifications
You must be signed in to change notification settings - Fork 156
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
Speed issue #648
Comments
Options are FDW-specific, so you cannot use You need an
But I think it would be simpler to query for a primary key that doesn't exist:
|
thank you @laurenz for your quick response. Any ideas why? The last option works - it is fast, but you need to know that there is an |
It may be that the reason it doesn't work is that you are using an old version of oracle_fdw. |
Yes, I'm using 2.5.0 because there is a bug in 2.6.0, which you planed to resolve in 2.7.0
|
You can use the current development version. |
Hi there,
I have an oracle_fdw like this:
my problem is when I issue this query (
table
is a foreign table):select * from sch.table where id = 1;
it takes about 4ms to complete, but this queryselect * from sch.table limit 1;
takes about 45 seconds to complete.I kind of understand why. I used
explain
and the second query returns all the rows (circa 65k) and the first one only the row with id = 1I don't have any control over the source oracle database and the owner sometimes changes the structure of the tables, column type etc. so I thought I could make a probe which goes thru all my foreign tables and executes a universal select to see if the foreign table works. The problem is that I have a 100 foreign tables and each
select * from sch.table limit 1;
takes more than 10 secs making this very slow.I've tried to
ANALYZE
each table, but it did not help with the speed at all. Alsouse_remote_estimate
option of remote server is not supported on oracle_fdw.Does anybody have any suggestions, how to have a universal query for all 100+ tables, which will be fast?
The text was updated successfully, but these errors were encountered: