Chapter 10. Optimizing Apache Sedona Applications
Apache Sedona is a constantly evolving project; numerous improvements are underway, including Apache Iceberg geospatial data types, spatial Parquet, and GeoArrow integrations. It’s good to understand which functionalities are recommended to make your application reliable, performant, faster, and more memory efficient. In this chapter, you will learn how to optimize your spatial join queries, accelerate your Apache Sedona Python application, and efficiently store data in Parquet and Apache Iceberg formats.
We will utilize publicly available data, primarily from the Overture Maps Foundation, and will randomly generate it using the Apache Sedona Spider dataset. All tests were performed on an Apple MacBook Pro with an M3 Pro processor (11 cores) and 36 GB of RAM. We prepared numerous examples in the Jupyter Notebook environment.
Optimizing the Apache Sedona Program
Apache Sedona heavily relies on partitioning and parallel data processing; the data must be serialized and transferred across the nodes of your Apache Spark cluster. For smaller datasets, this doesn’t make much of a difference. Still, as the scale increases, the large number of columns in your query can negatively impact query performance, CPU usage, and memory usage, especially when you cache or store partial results on disk.
Select Only the Needed Columns
In multispatial join queries or spatial aggregations, it is best to retain only the necessary columns to optimize ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access