About jira database

I want to find some IssueId that meet the conditions is ‘StringValue in (xxx,yyy,zzz)’ from the ‘customfieldvalue’ table of database.
But data is a lot of data. Have 200 million.
If I directly query ‘select * from customfieldvalue where customfield= ‘123456’ and stringvalue in (xxx,yyy,zzz)’,it will take 8min and more.
So I want to ask you if there is a better way to achieve it?

JIRA Version : 7.6.x
Database: Pgsql 9.x

I have tried to use union instead of in , it useless.

I created an ‘index’ on ‘stringvalue’ field.
It takes about seven seconds.