Softwr

Databases · head to head

Amazon Athena vs Dgraph

Amazon Athena logo

Amazon Athena

Databases

Serverless SQL over data in S3, charged per terabyte scanned

From
$5/TB scanned
Free plan
No
Dgraph logo

Dgraph

Databases

Apache 2.0 distributed graph database written in Go, maintained by Hypermode, queried through GraphQL or its own DQL language.

From
Free
Free plan
Yes

The short version

  • Dgraph has a free plan, then $39/mo; Amazon Athena starts at $5/mo.
  • Only Amazon Athena lists SQL on S3; only Dgraph lists generated GraphQL API.
  • Where Amazon Athena falls short: cost is tied to bytes scanned, so unpartitioned CSV or JSON data can make a single careless query expensive.

How do Amazon Athena and Dgraph differ?

Amazon Athena and Dgraph differ on starting price ($5/TB scanned against Free), pricing model and free tier (No against Yes). Only the attributes on which Amazon Athena and Dgraph actually diverge.

Attributes where Amazon Athena and Dgraph differ
AttributeAmazon AthenaDgraph
Starting price$5/TB scannedFree
Pricing modelPer TB scanned, or per DPU-hourFreemium
Free tierNoYes
PlatformsWeb, LinuxLinux, macOS, Self-hosted, Web

Not yet recorded: category for Amazon Athena, founded for Amazon Athena.

Which features does each one have?

They share no listed features; 6 appear only for Amazon Athena and 10 only for Dgraph. Drawn from each product's published feature list. An absence here means we hold no record of it - not that the product lacks it.

Only in Amazon Athena

  • SQL on S3
  • Apache Spark
  • Capacity Reservations
  • Federated queries
  • Glue Data Catalog
  • Iceberg tables

Only in Dgraph

  • Apache 2.0 licence
  • Generated GraphQL API
  • DQL query language
  • Predicate sharding
  • Raft replication
  • Distributed ACID transactions
  • Written in Go
  • Full-text and geo indexing

What is each one used for?

Amazon Athena is most often brought in for searching years of CloudTrail, ALB and VPC flow logs stored in S3. The jobs each tool is most often brought in to do.

Amazon Athena

  • Searching years of CloudTrail, ALB and VPC flow logs stored in S3not Dgraph
  • Ad hoc analysis of a data lake without standing up a warehousenot Dgraph
  • Occasional reporting queries where a cluster would sit idlenot Dgraph
  • Data preparation with Spark notebooks alongside SQLnot Dgraph

Dgraph

  • An application whose core data is a graph, such as permissions, social connections or product relationships, where the frontend already consumes GraphQLnot Amazon Athena
  • A knowledge graph that outgrew a single machine and needs storage distributed across nodes without a per-core licence negotiationnot Amazon Athena
  • Recommendation or fraud-detection features that traverse several hops at request time, where a relational join chain has become the bottlenecknot Amazon Athena
  • Teams that want a graph database they can read, fork and self-host under a permissive licence rather than a source-available onenot Amazon Athena

Where do Amazon Athena and Dgraph fall short?

Amazon Athena's most cited limit: cost is tied to bytes scanned, so unpartitioned CSV or JSON data can make a single careless query expensive. Documented limitations, not opinions. Every one is a constraint you would hit in normal use.

Amazon Athena

  • Cost is tied to bytes scanned, so unpartitioned CSV or JSON data can make a single careless query expensive
  • It has no managed storage layer, so query speed depends on how well you organise, compact and partition files in S3
  • Concurrency and performance isolation are weaker than a dedicated warehouse unless you buy Capacity Reservations
  • Failed queries are still billed in some cases for data scanned, which punishes trial and error on large tables
  • Governance, caching and workload management are thinner than in Redshift or Snowflake, so heavy BI use outgrows it

Dgraph

  • Sharding is by predicate, so a single very hot predicate lives entirely in one Raft group and cannot be split further; adding nodes does not relieve it and the fix is a data model change
  • Stewardship passed from Dgraph Labs to Hypermode after the original company stopped operating independently, so anyone building on it is betting on a second custodian rather than on the original team's roadmap
  • The GraphQL layer is generated and opinionated, so anything it does not express drops you into DQL, which is a second language your team must learn and which no other database speaks
  • The community is a fraction of Neo4j's, so operational answers, tuning experience, hiring and third-party tooling are all thinner, and unusual failure modes in a Zero and Alpha cluster leave you reading source rather than a forum
  • There is no portable graph standard to migrate to; Cypher, Gremlin and SPARQL are all different query models, so the schema and every query is a rewrite if you later leave, and that cost grows with the application

How much do Amazon Athena and Dgraph cost?

Amazon Athena starts at $5/mo; Dgraph has a free plan, with paid plans from $39/mo. Plan by plan below, from each vendor's own pricing page.

Amazon Athena

$5/TB scanned
  • SQL queries$5/tb scanned
    • $5.00 per TB of data scanned
    • Compression, partitioning and columnar formats reduce the data scanned
  • Apache Spark$0.35/dpu-hour
    • $0.35 per DPU-hour for Spark applications
  • Capacity Reservations$0.3/dpu-hour
    • $0.30 per DPU-hour for reserved query capacity
    • Suited to predictable, steady workloads

Dgraph

Free
  • CommunityFree
    • Native GraphQL
    • Graph queries
    • Full-text search
  • Cloud$39/mo
    • Managed service
    • Auto-scaling
    • Enterprise support

Which should you pick?

Choose Amazon Athena if

  • You need sql on s3.
  • You work on Web, Linux.
  • You also want apache spark.

Choose Dgraph if

  • You need apache 2.0 licence.
  • You want to start without paying.
  • You work on Linux, macOS, Self-hosted, Web.
  • You also want generated graphql api.

Questions people ask

Is Amazon Athena or Dgraph better?
It depends on the job. Amazon Athena fits searching years of CloudTrail, ALB and VPC flow logs stored in S3; Dgraph fits an application whose core data is a graph, such as permissions, social connections or product relationships, where the frontend already consumes GraphQL. Amazon Athena starts at $5/TB scanned and Dgraph at Free.
Which is cheaper, Amazon Athena or Dgraph?
Dgraph has a free tier; the other does not. Paid plans start at $5/TB scanned for Amazon Athena and Free for Dgraph.
Does Amazon Athena or Dgraph run on more platforms?
Amazon Athena runs on Web, Linux. Dgraph runs on Linux, macOS, Self-hosted, Web.
Can I use Dgraph for free?
Yes. Dgraph has a free tier, so you can try it without paying. Amazon Athena starts at $5/TB scanned.
What is Amazon Athena best used for?
Amazon Athena is most often used for searching years of cloudtrail, alb and vpc flow logs stored in s3, ad hoc analysis of a data lake without standing up a warehouse, occasional reporting queries where a cluster would sit idle, data preparation with spark notebooks alongside sql. Of those, searching years of cloudtrail, alb and vpc flow logs stored in s3 and ad hoc analysis of a data lake without standing up a warehouse are not what Dgraph is typically brought in for.
What can Amazon Athena do that Dgraph cannot?
Amazon Athena covers SQL on S3, Apache Spark, Capacity Reservations, Federated queries. Dgraph covers Apache 2.0 licence, Generated GraphQL API, DQL query language, Predicate sharding.

Answered from the vendors’ own pages

Amazon Athena: How much does Athena cost?

SQL queries are $5.00 per TB scanned, Spark is $0.35 per DPU-hour and Capacity Reservations are $0.30 per DPU-hour, per AWS.

Dgraph: Is Dgraph open source?

Yes. The current repository is Apache 2.0, which is a permissive OSI licence, and the project is at v25 under Hypermode's maintenance.

Amazon Athena: How do I reduce Athena cost?

Convert data to a columnar format such as Parquet, compress it and partition by common filters. The AWS example cuts a $15 query to $1.25.

Dgraph: Is it really GraphQL?

It serves a generated GraphQL API, which is real GraphQL for clients. Its native language, DQL, resembles GraphQL syntactically but is Dgraph's own language and is not the GraphQL specification.

Amazon Athena: Is Athena a data warehouse?

No. It queries files in S3 and has no storage of its own; Redshift is the warehouse product.

Dgraph: How does it compare to Neo4j?

Neo4j has the larger ecosystem, Cypher, and far more operational precedent. Dgraph distributes storage across nodes by default and gives you a GraphQL endpoint without writing resolvers. The choice usually turns on whether you need horizontal scale and a GraphQL surface more than you need ecosystem depth.

Dgraph: What does a production cluster look like?

At minimum a set of Zero nodes for coordination and a replicated set of Alpha nodes for data, typically three of each for fault tolerance, which is a meaningfully larger operational footprint than a single graph server.

Dgraph: Who maintains it now?

Hypermode. Dgraph Labs, the original company, no longer operates it, and that change of custodian is the main non-technical risk to weigh.

Share

Related pages

Other head to heads