Optimize query
For #28-gae-with-triple-store