I have a db with 250 attributes. The whole thing is a couple hundred MB. Most queries and transactions are generally performant except when they’re not - at all.
For example, one entity type has a unique string id field, say
:myns/-id. There are only about 30 of these entities in the db, yet a simple query based on that id field takes 250 milliseconds to return.
I have tried:
:index trueto that field
- running the query a few times to make sure the data is cached by the peer library
- local transactor (macbook pro, light load)
- AWS transactor backed by DDB (t2.medium instance)
- local peer library
- AWS peer library with m2.large instance, 1.5G object cache, and 1G memory index
This is not the only slow query I am seeing, but it’s the hardest to explain.
What factors affect query performance that I haven’t mentioned? Why could a simple indexed one-attribute lookup take 250ms?