A method for querying data in non-fragmentation key fields after sharding databases and tables in a distributed system

A distributed system, sub-database and sub-table technology, applied in the field of non-fragmentation key field query data after distributed system sub-database sub-table, can solve the problems of data single-point index data difficulty, system performance loss, etc., to achieve adaptation Strong performance and flexibility, solve performance loss, and high efficiency

Active Publication Date: 2021-09-07
SICHUAN XW BANK CO LTD
View PDF9 Cites 0 Cited by
  • Summary
  • Abstract
  • Description
  • Claims
  • Application Information

AI Technical Summary

Problems solved by technology

[0012] The purpose of the present invention is to provide a method for querying data in a non-fragmentation key field after the distributed system is divided into databases and tables, so as to solve the serious system performance loss and data single point in the prior art when performing data query through the non-fragmentation key field And the difficulty of smooth expansion of index data

Method used

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
View more

Image

Smart Image Click on the blue labels to locate them in the text.
Viewing Examples
Smart Image
  • A method for querying data in non-fragmentation key fields after sharding databases and tables in a distributed system

Examples

Experimental program
Comparison scheme
Effect test

Embodiment

[0046] This embodiment provides a method for querying data in a non-fragmentation key field after the distributed system is divided into tables and databases, aiming to solve the problem of querying data through non-sharding key fields when the application system involving database and table division is involved in the system development stage. Queries have problems such as high system performance loss, unavailability of data at a single point, and difficulty in smooth expansion of index data. like figure 1 As shown, the main process of this embodiment is as follows:

[0047] Step 1: Store indexed entity objects

[0048] (1.1) Define the index entity object, which contains the primary key (represented by the serial number field), the data fragmentation key field, and other non-shard key fields (such as the customer index entity object, with ID number, name, mobile phone number, email address, etc.), to get the index entity object;

[0049] (1.2) Convert the index entity obj...

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
Login to view more

PUM

No PUM Login to view more

Abstract

The invention discloses a method for querying data in a non-fragmentation key field after sub-database and sub-table in a distributed system, which is to store the index entity object in Elasticsearch, and obtain the index through the API provided by Elasticsearch when initiating data query to Elasticsearch The value of the shard key field corresponding to the data, and then use the sharding algorithm tool to locate the specific corresponding shard for data query operations, and finally return the query results to realize data query. The present invention solves the problems of serious system performance loss, single point of data and difficult smooth expansion of index data in the prior art when performing data query through non-fragmentation key fields, and is more suitable for current system development, testing and use requirements, and has practical value higher.

Description

technical field [0001] The invention relates to a method for querying data in a non-fragmentation key field after sub-database and table division in a distributed system. Background technique [0002] In the system development stage, the application system of sub-database and table is usually involved. At present, data query is generally performed through non-shard key fields, and the existing common query methods are as follows: [0003] 1. Traverse query method [0004] Such as a user table, the table serial number, name, mobile phone number and other fields, according to the fragmentation algorithm: serial number% fragmentation number to get the fragmentation result, if the fragmentation number is 64 pieces, if the serial number is used to query, the fragmentation algorithm will be used Get a specific shard and then perform data query operations. If you use a mobile phone number to query, you will perform data query on up to 64 shards until the data is queried and the re...

Claims

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
Login to view more

Application Information

Patent Timeline
no application Login to view more
Patent Type & Authority Patents(China)
IPC IPC(8): G06F16/2458G06F16/22G06F16/28
CPCG06F16/2228G06F16/2471G06F16/288
Inventor 李长彬
Owner SICHUAN XW BANK CO LTD
Who we serve
  • R&D Engineer
  • R&D Manager
  • IP Professional
Why Eureka
  • Industry Leading Data Capabilities
  • Powerful AI technology
  • Patent DNA Extraction
Social media
Try Eureka
PatSnap group products