At Palo Alto Networks, broad security queries against hundreds of millions of cloud resource records produced high response times which lead to lower throughput. Traditional fixes — sharding, materialized views — all require schema changes. This talk presents HSSPS (Heuristic Search Space Partitioning System): a query-time optimization layer that logically partitions search space without touching the database schema. Deployed in production and covered by two granted U.S. patents, HSSPS reduced P95 latency by over 95%, increased throughput 8–10×, and cut infrastructure cost by ~50%. A reusable pattern for any multi-tenant system facing the same problem.

