Accepted for/Published in: JMIR Medical Informatics
Date Submitted: Aug 24, 2025
Open Peer Review Period: Aug 24, 2025 - Oct 19, 2025
Date Accepted: May 31, 2026
(closed for review but you can still tweet)
Benchmarking FHIR-Based Analytics: A Performance Comparison Between RESTful Server Queries and Big Data Engines
ABSTRACT
Background:
Electronic health records offer vast clinical data for healthcare research, but interoperability challenges often hinder comprehensive analysis. The HL7® FHIR® standard addresses these challenges, though its nested and interconnected resource format can be complex for analytics. Several tools have emerged to facilitate analytical access, either by querying FHIR servers via REST APIs or encoding resources in relational formats. Yet, the performance implications of these methods remain largely unexplored.
Objective:
Benchmark the performance characteristics of FHIR-server based analytics against big data frameworks.
Methods:
We benchmarked the FHIR-PYrate library, which interfaces with a FHIR server’s REST API, against Pathling, a library built for analytics based on Apache Spark, and Trino, a general-purpose SQL query engine. We defined and implemented multiple queries in each engine using three common analytics scenarios - data aggregation, counting, and extraction. Execution times were measured across Synthea-generated datasets of increasing size.
Results:
On the largest dataset, containing 74,815,563 FHIR resources, Trino completed the aggregate query 3079 times faster and Pathling 197 times faster than FHIR-PYrate. On average across all queries, Trino outperformed FHIR-PYrate, executing extraction queries 34 times and count queries 16 times faster. Pathling achieved a 4x speedup for extraction queries, although 0.4 times slower for count queries.
Conclusions:
While the REST-based FHIR search API is useful for standard queries and retrieving specific patient records, it generally lacks the performance and expressiveness needed for complex analytics. In contrast, alternative engines such as Trino and Pathling demonstrated substantial performance advantages for these scenarios.
Citation
Request queued. Please wait while the file is being generated. It may take some time.
Copyright
© The authors. All rights reserved. This is a privileged document currently under peer-review/community review (or an accepted/rejected manuscript). Authors have provided JMIR Publications with an exclusive license to publish this preprint on it's website for review and ahead-of-print citation purposes only. While the final peer-reviewed paper may be licensed under a cc-by license on publication, at this stage authors and publisher expressively prohibit redistribution of this draft paper other than for review purposes.