Query performing badly

Hi,

We are using the below query. We added the highlighted filter recently.Previously there a simple ‘in’ filter was used instead of the complex highlighted filter. Although the individual queries seems to work fine but when the code is deployed to the entire cluster the query response time increases considerably and creates latency in the druid cluster. We are still not able to figure out the exact reason.Removing the highlighted part of the filter replacing it with only {“type”:“in”,“dimension”:“site”,“values”:[“US-0”,“AUTOS-100”]} works absolutely fine. Any idea what might be the issue.

Query :{

“queryType”:“topN”,
“dataSource”:“clicks_nrt”,
“dimension”:{
“dimension”:“campaignId”,
“outputName”:null,
“outputType”:null
},
“threshold”:50000,
“metric”:“count”,
“granularity”:“all”,
“aggregations”:[
{
“name”:“count”,
“fieldName”:“count”,
“type”:“longSum”
}
],
“filter”:{
“type”:“and”,
“fields”:[
{
“type”:“and”,
“fields”:[
{
“type”:“or”,
“fields”:[
{
“type”:“in”,
“dimension”:“listingSite”,
“values”:[
“US-0”,
“AUTOS-100”
]
},
{
“type”:“and”,
“fields”:[
{
“type”:“in”,
“dimension”:“site”,
“values”:[
“US-0”,
“AUTOS-100”
]
},
{
“type”:“in”,
“dimension”:“listingSite”,
“values”:[
null,
“INVALID–99999999”
]
}
]
}
]
},
{
“type”:“in”,
“dimension”:“sellerId”,
“values”:[
“1228059948”
]
}
]
},
{
“type”:“not”,
“field”:{
“type”:“in”,
“dimension”:“campaignId”,
“values”:[
“null”,
null
]
}
}
]
},
“intervals”:[
“2019-02-25T08:00:00Z/2019-03-28T07:00:00Z”
]
}