Hello. I’ve just started using Grakn for work, and I’ve found it very nice to use compared to our previous solution, however, I’ve found that the first handful of queries during any new session are extremely slow.
If we are batch loading data, this is fine, but part of our use case is to have a user write single pieces of data as needed via a web interface. To get around this slow query issue, I’m currently executing 20 dummy queries at the start of the session, which makes the later queries execute in a more reasonable time. The time for executing 26 queries (the number of queries I need to execute when the user submits a piece of data) without the 20 dummy queries is ~8sec, whereas with the 20 dummy queries it is only ~3sec. If I execute 100 dummy queries instead, the time to execute the 26 queries is less than 1sec, at the cost of more time spent executing the dummy queries.
I could not find any documentation or posts on this; other posts discuss slow query speeds due to schema design or query format, but none relating to the slow queries at the start of a session or how to fix it. I am using the Python API and Grakn installed via Homebrew, in case that is relevant. Any advice is appreciated. Thanks.