A database query method and device
A query method and database technology, which are applied in the fields of electrical digital data processing, special data processing applications, instruments, etc., can solve the problems of large system resource consumption, query time consumption process, low query efficiency, etc., so as to reduce the amount of calculation and improve the query efficiency. The effect of efficiency
- Summary
- Abstract
- Description
- Claims
- Application Information
AI Technical Summary
Problems solved by technology
Method used
Image
Examples
Embodiment 1
[0051] The embodiment of the present invention provides a database query method, see figure 1 .
[0052] 101: Receive a query request for the target data table, where the query request includes query conditions;
[0053] 102: Obtain a global index corresponding to the target data table, the global index is the corresponding relationship between split field data and index field data in the target data table, and the index field is other fields in the target data table except the split field;
[0054] 103: Query the split field data that meets the query conditions in the global index;
[0055] 104: In each storage sub-database corresponding to the target data table, query the query record corresponding to the split field data that satisfies the query condition.
[0056]Wherein, in each data table in the database, a global index corresponding to each data table is pre-generated according to query requirements, and there may be one or more global indexes corresponding to each da...
Embodiment 2
[0063] The embodiment of the present invention provides a database query method, see image 3 .
[0064] 301: Receive a query request for a target data table, where the query request includes a query condition.
[0065] Wherein, the query condition in the query request may be a database query statement. Correspondingly, the query statement needs to include the target data table to be queried, the field to be queried and the condition. For example: SELECT*from name WHERE birthday='2011-04-08', where name is the target data table to be queried, birthday is the field to be queried in the name table, and the condition is that the query birthday field belongs to '2011-04- 08' record.
[0066] 302: Obtain a global index corresponding to the target data table. The global index is the corresponding relationship between split field data and index field data in the target data table, and the index fields are other fields in the target data table except the split field.
[0067] Wher...
Embodiment 3
[0091] The embodiment of the present invention provides a database query device, see Figure 5 , the device consists of:
[0092] The first receiving module 501 is configured to receive a query request for the target data table, where the query request includes query conditions;
[0093] The first obtaining module 502 is used to obtain the global index corresponding to the target data table, the global index is the corresponding relationship between the split field data and the index field data in the target data table, and the index field is the split field in the target data table field other than ;
[0094] The first query module 503 is used to query the split field data satisfying the query condition in the global index;
[0095] The second query module 504 is configured to query the query records corresponding to the split field data satisfying the query conditions in each storage sub-database corresponding to the target data table.
[0096] Wherein, the first acquisit...
PUM
Login to View More Abstract
Description
Claims
Application Information
Login to View More 


