Skip to content

client.query() causes dgraph alpha to write to disk constantly #27

@lyiqian

Description

@lyiqian

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?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions