The invention relates to the technical field of
database optimization, in particular to a
distributed cache preloading-based
SQL query result quick return method, which comprises the following steps of: performing parameter abstraction on an
SQL to generate a key prefix; judging
SQL fingerprint hotspots, marking preloaded objects, and writing the preloaded objects into a hotspot
list; generating a preloading task by utilizing the hotspot
list; designing cache and storage; loading the
result set in a fragmentation manner, splitting the
result set into a plurality of fragmentation tasks, and concurrently executing pre-computation by using threads; adding
data consistency metadata when the cache is written; splicing cache keys, and querying cache and storage hit conditions; providing a cache failure and avalanche prevention mechanism of the step random TTL; and the gateway layer exposes cache
system design and
performance monitoring indexes, and triggers an alarm by using the cache
system design or
performance monitoring. According to the method, the problems of high passive back-to-source
delay, inaccurate hotspot identification, poor
data consistency, large
result set loading
bottleneck, cache avalanche and the like in the existing
distributed cache technology are solved.