I was trying to measure how long it took for this simple query to execute:
companyRepository.findOne(companyId); // took 300ms
Here is the repository class I use:
package fn.repository;
import org.springframework.data.mongodb.repository.MongoRepository;
import org.springframework.data.querydsl.QueryDslPredicateExecutor;
import org.springframework.data.rest.core.annotation.RepositoryRestResource;
import fn.model.Company;
@RepositoryRestResource(exported = false)
public interface CompanyRepository extends MongoRepository<Company, String>, QueryDslPredicateExecutor<Company> {
}
Is it normal to take this long for an indexed lookup?