select body.nominativo from production_tlp2020where ANY array_element IN SUFFIXES(UPPER(body.nominativo)) SATISFIES array_element like '%PIL%' END
and _type='record'
and it correctly uses this index layer_record_nominativo
After 5 minutes, same query (whitout adding any data to db) uses another index type_index
I have changed the query to this
select body.nominativo from production_tlp2020 use index(layer_record_nominativo)
where ANY array_element IN SUFFIXES(UPPER(body.nominativo)) SATISFIES array_element like '%PIL%' END
and _type='record'
but it still uses the wrong index.
Here the indexes
CREATE INDEX layer_record_nominativoONproduction_tlp2020((distinct (array array_elementforarray_element in suffixes(upper((body.nominativo))) end))) WHERE (_type = "record")
CREATE INDEX type_indexONproduction_tlp2020(_type)
So, after a reload of the server it uses the correct index for minutes and later switch to wrong index, what can I do? Thanks