Not using index because of backticks

I have a strange situation here where the system:completed_requests is highlighing a slow query


I have the following partial index defined:
CREATE INDEX consumersByScvId ON default((scv.id)) PARTITION BY hash(brandCode) WHERE (_class = “com.elc.d2c.consumers.model.Consumer”)
but its not using it when I run the following query:

it does use it when I run the query without the backticks around scv.id

anyone any ideas?

back ticks are at wrong place

{"svc":{"id":1234}}    ===>   `svc`.`id`
{"svc.id":12345}    ====>  `svc.id`

If predicate has AND/OR’s use parenthesis to define precedence.

1 Like