Commit fcecd19f authored by Matija Obreza's avatar Matija Obreza

/explore/tile join Accession only when required

parent f89e2d72
......@@ -284,7 +284,11 @@ public class GenesysFilterServiceImpl implements GenesysFilterService {
final DirectMysqlQuery directQuery = new DirectMysqlQuery("accessiongeo", "geo");
directQuery.filterTile(zoom, xtile, ytile);
directQuery.innerJoin("accession", "a", "a.id=geo.accessionId");
if (!filters.isEmpty() || !distinct) {
// Join accession table when we have filters or looking at details
directQuery.innerJoin("accession", "a", "a.id=geo.accessionId");
}
if (!filters.isEmpty()) {
directQuery.join(filters);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment