This document discusses using distributed PostgreSQL databases to enable interactive analysis of analytics data captured by Heap. It describes how Heap captures large amounts of user data, but making this data interactive to query is challenging. The solution involves storing the denormalized analytics data across multiple PostgreSQL databases using CitusDB to enable distributed queries. Custom user-defined functions are also created to allow expressive analysis of the distributed data, such as tracking users through multi-step funnels.