PostgreSQL JDBC optimization method and system for ZNBase database
An optimization method and database technology, applied in the direction of electrical digital data processing, special data processing applications, digital data information retrieval, etc., can solve problems such as reducing SQL execution performance, and achieve the effect of improving execution performance and reducing communication.
- Summary
- Abstract
- Description
- Claims
- Application Information
AI Technical Summary
Problems solved by technology
Method used
Image
Examples
Embodiment 1
[0034] combined with figure 1 , present embodiment proposes a kind of PostgreSQL JDBC optimization method of ZNBase database, and its optimization content comprises:
[0035] Step S101, initialize the connection pool, thread pool and cache. in:
[0036] The connection pool is used to save the connection with the nodes in the database cluster.
[0037] The thread pool is used to start new threads, obtain SQL execution nodes, and store them in the cache, and the number of threads in the thread pool is the number of CPU cores of the database running the operating system*2.
[0038] The cache is used to store SQL and corresponding execution nodes. The cache reuses the LRUCache class in PostgreSQL JDBC, where the Key is an SQL string, the Value is a RouteInfo class, and the RouteInfo class stores the IP port and node number; through the SQL string, query in the cache to determine whether it is a hit cache.
[0039] Step S102, based on the LRUCache class in PostgreSQL JDBC, query
Embodiment 2
[0048]This embodiment proposes a PostgreSQL JDBC optimization system for a ZNBase database. Its implementation involves a cache, a connection pool, and a thread pool. The cache is used to store SQL and corresponding execution nodes, and the connection pool is used to store and connect nodes in the database cluster. connection, the thread pool is used to start a new thread, obtain the SQL execution node, and store it in the cache.
[0049] combined with figure 1 , the optimization system is based on cache, connection pool, thread pool, and the specific process of optimizing PostgreSQL JDBC includes:
[0050] Step S101, initialize the connection pool, thread pool and cache. in:
[0051] The connection pool is used to save the connection with the nodes in the database cluster.
[0052] The thread pool is used to start new threads, obtain SQL execution nodes, and store them in the cache, and the number of threads in the thread pool is the number of CPU cores of the database runnin
PUM
Abstract
Description
Claims
Application Information
- R&D Engineer
- R&D Manager
- IP Professional
- Industry Leading Data Capabilities
- Powerful AI technology
- Patent DNA Extraction
Browse by: Latest US Patents, China's latest patents, Technical Efficacy Thesaurus, Application Domain, Technology Topic.
© 2024 PatSnap. All rights reserved.Legal|Privacy policy|Modern Slavery Act Transparency Statement|Sitemap