Skip to content
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

Pushdown $eq on 'String' not working properly #4209

Open
shenyi0828 opened this issue Mar 23, 2024 · 1 comment
Open

Pushdown $eq on 'String' not working properly #4209

shenyi0828 opened this issue Mar 23, 2024 · 1 comment
Assignees
Labels
code/bug Some user-visible feature works incorrectly not ready Issues that are not ready to be worked on; PRs that should skip CI
Milestone

Comments

@shenyi0828
Copy link

FerretDB version

v1.20.1

Backend

PostgreSQL

Environment

  • OS: CentOS8
  • Deployment: ghcr.io/ferretdb/ferretdb:1.20.1
  • Deployment details: k8s 1.25.x

What did you do?

I ran db.my_collection.findOne({'some_key' : 'match_value'}), it took many time to complete . And I found output like below:

Query	{"commandTag": "SELECT 1", "pid": 44279, "sql": "SELECT  _jsonb FROM \"my_db\".\"my_collection_xxxx\" WHERE _jsonb->$1 @> $2", "args": ["some_key","\"some_value\""], "time": "457.106837ms"}

note that it use @> (means "contains") other than = operator.

I ran explain:
db.runCommand({ explain: { findOne: "my_collection", query: { "some_key": {$eq: "match_value"}} }} )

What did you expect to see?

"filterPushdown" : true

What did you see instead?

"filterPushdown" : false

@shenyi0828 shenyi0828 added code/bug Some user-visible feature works incorrectly not ready Issues that are not ready to be worked on; PRs that should skip CI labels Mar 23, 2024
@AlekSi
Copy link
Member

AlekSi commented Mar 25, 2024

That should be solved by the upcoming 2.0

@AlekSi AlekSi added this to the v2.0.0 milestone Mar 25, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
code/bug Some user-visible feature works incorrectly not ready Issues that are not ready to be worked on; PRs that should skip CI
Projects
None yet
Development

No branches or pull requests

3 participants