Closed kevkev82 closed 2 years ago
I will investigate the issue and let you know that.
On Tue, Apr 5, 2016 at 8:16 PM, kevkev82 notifications@github.com wrote:
Hi,
I experience an issue using mongo_fdw : The where clause of my SQL statement is not send to mongodb.
My query is : _select * from foreign table where col1_name = ‘textvalue’;
When I issue this query I have this following log in /var/log/mongodb/mongod.log :
_2016-04-05T16:51:10.280+0200 I QUERY [conn1] _query test.collectionname query: { $query: {} } planSummary: COLLSCAN cursorid:22231466144 ntoreturn:0 ntoskip:0 keysExamined:0 docsExamined:101 keyUpdates:0 writeConflicts:0 numYields:2 nreturned:101 reslen:205721 locks:{ Global: { acquireCount: { r: 6 } }, Database: { acquireCount: { r: 3 } }, Collection: { acquireCount: { r: 3 } } } 43ms _
I don’t know what to do, I really need this filter for performance.
It’s curious because when I try to filter with another column It work :
_select * from where dat > '21/12/2015 04:00:00' and dat < '21/12/2015 05:00:00’ _ _2016-04-05T16:58:32.389+0200 I QUERY [conn1] _query test.collectionname query: { $query: { dat: { $gt: new Date(1450670400000), $lt: new Date(1450674000000) } } } planSummary: IXSCAN { dat: 1.0, idn235: 1.0, type1: 1.0 } cursorid:24567021291 ntoreturn:0 ntoskip:0 keysExamined:101 docsExamined:101 keyUpdates:0 writeConflicts:0 numYields:4 nreturned:101 reslen:205721 locks:{ Global: { acquireCount: { r: 10 } }, Database: { acquireCount: { r: 5 } }, Collection: { acquireCount: { r: 5 } } } 58ms So, what are the conditions to make it work ?
I already insert about 23 millions documents in this collection (using insert query in postgresql) and select query in postgresql are very long contrary to find in mongo command line that respond immediately.
Any help would be very appreciate :-)
— You are receiving this because you are subscribed to this thread. Reply to this email directly or view it on GitHub https://github.com/EnterpriseDB/mongo_fdw/issues/49
Ibrar Ahmed EnterpriseDB http://www.enterprisedb.com
Hi Kev, Can you please reproduce this issue with a simpler example like we have the warehouse test-case on github...Please do "explain verbose" of the query where the where clause is not getting pushed down and share the explain plan with us...
Please share the sample collection and complete example. Ahsan explain verbose will not be helpful in that case.
okay explain verbose is currently not supported for mongodb_fdw. We should add this as a new feature request...
Hi Kev,
Can you please share a test case that we can use to reproduce the issue?
@kevkev82 , Are you still facing reported issue?
@vaibhavdalvi93 really sorry, but I don't even remember this project too long time ago... as I'm also developper I certainly found another way to achieve my task.
Hi,
I experience an issue using mongo_fdw : The where clause of my SQL statement is not send to mongodb.
My query is : _select * from foreign table where col1_name = ‘text_value’;_
When I issue this query I have this following log in /var/log/mongodb/mongod.log :
_2016-04-05T16:51:10.280+0200 I QUERY [conn1] query test.collection_name query: { $query: {} } planSummary: COLLSCAN cursorid:22231466144 ntoreturn:0 ntoskip:0 keysExamined:0 docsExamined:101 keyUpdates:0 writeConflicts:0 numYields:2 nreturned:101 reslen:205721 locks:{ Global: { acquireCount: { r: 6 } }, Database: { acquireCount: { r: 3 } }, Collection: { acquireCount: { r: 3 } } } 43ms _
I don’t know what to do, I really need this filter for performance.
It’s curious because when I try to filter with another column It work :
select * from where dat > '21/12/2015 04:00:00' and dat < '21/12/2015 05:00:00’
_2016-04-05T16:58:32.389+0200 I QUERY [conn1] query test.collection_name query: { $query: { dat: { $gt: new Date(1450670400000), $lt: new Date(1450674000000) } } } planSummary: IXSCAN { dat: 1.0, idn235: 1.0, type1: 1.0 } cursorid:24567021291 ntoreturn:0 ntoskip:0 keysExamined:101 docsExamined:101 keyUpdates:0 writeConflicts:0 numYields:4 nreturned:101 reslen:205721 locks:{ Global: { acquireCount: { r: 10 } }, Database: { acquireCount: { r: 5 } }, Collection: { acquireCount: { r: 5 } } } 58ms
So, what are the conditions to make it work ?
I already insert about 23 millions documents in this collection (using insert query in postgresql) and select query in postgresql are very long contrary to find in mongo command line that respond immediately.
Any help would be very appreciate :-)