Home / Companies / Socure / Blog / Post Details
Content Deep Dive

Latency and Cost Reduction by SQL Optimization

Blog post from Socure

Post Details
Company
Date Published
Author
Gayathri Krishnan
Word Count
1,178
Company Posts That Month
19
Language
English
Hacker News Points
-
Post removed?
No
Summary

Socure’s Alertlist Matcher, which checks users against industry risk lists during onboarding, faced growing latency and scaling costs because its database query required a join between dataset metadata and alert-list data tables, resulting in roughly 100–110 ms P95 response times and limited throughput. An initial index improvement modestly helped active-dataset queries, but query-plan analysis showed that removing the join was more effective than alternatives such as splitting field searches into unioned queries. The team cached mappings from public dataset identifiers and versions to internal dataset IDs in Memcache, queried the data table directly using the cached ID, invalidated the cache when datasets changed, and retained a database fallback for cache misses. This change preserved customer-visible behavior while reducing P95 latency from 110 ms to 19 ms, raising measured peak request capacity from 45 to 75 requests per second, maintaining full availability, and allowing the service to use fewer and smaller database and compute instances, reducing infrastructure spending over subsequent months.

Trends Found in this Post

No tracked trend matches for this post yet.

Use This Data

Use this post, company, and trend context to find content marketing opportunities, perform competitive analysis, or address product feature gaps via the Plushcap MCP server or the Plushcap API.