Thanks for your reply.
Index you shared works fine but customer.code can change. I can’t create indexes for every customer. I created an index using the following script:
CREATE INDEX ix1 ON transaction_ms(transactionTime, customer.code) WHERE _class="net.infoowl.fraud.microservice.transaction.domain.PaymentTransaction"
This index speeds up the query but it is still slow. It takes more than 6 seconds. Any suggestion on this?
Thanks