Moved from GitHub pydgraph/27
Posted by liu1000:
When I use
client.query(...) to do pure reads from dgraph, I noticed the
dgraph alpha process constantly writing to disk. Snippet:
for q in pure_read_queries_to_run: client.query(q)
I have to do something like the following as a workaround:
txn = client.txn() for q in pure_read_queries_to_run: txn.query(q) txn.discard()
By doing this, performance improved by around 4 fold.
I think it may have something to do with the transaction handling in pydgraph?