IP Library Granted Patent US 10,042,888
Granted Patent B2
US 10,042,888 · App. 14/931,718 · Granted Aug 7, 2018

Searching in a database

Inventors: Yao Liang Chen (Beijing, CN); Xiao Yan Chen (Beijing, CN); Sheng Huang (Shanghai, CN); Kai Liu (Beijing, CN); Xiao Min Xu (Beijing, CN)
Assignee: International Business Machines Corporation
G06F17/30477G06F17/30528G06F17/30548G06F17/30551
View Patent ↗
Loading inventors, assignments & file history…
Monitor This Case
Get email alerts when status or documents change.
Order Certified Copies
Most orders are placed with the USPTO same day — all within 24 business hours.
Order via The Patent Place →
Pre-filled with this patent's details
Quick Facts
Patent No.
US 10,042,888
App. No.
14/931,718
Granted
Aug 7, 2018
Kind
B2
Abstract

A computer-implemented method for searching in a database is provided according to one embodiment. The method includes, in response to receiving a search request to search in a database, extracting from the search request a condition for searching in the database. The method further includes selecting a search algorithm matching the condition from a plurality of search algorithms registered to the database, based on historical statistic data of historical search conducted on the database. Moreover, the method includes obtaining a search result from the database by using the search algorithm. The database is a time series database.

Claims (57)

1. A computer-implemented method for searching in a time series database, comprising:

receiving a search request to perform a search in the time series database, where the time series database stores a plurality of sequences of measured values arranged in chronological order;

extracting from the search request a condition for performing the search in the time series database, the condition including a target subsequence to be searched for within the plurality of sequences of measured values within the time series database;

selecting a search algorithm to perform the search from a plurality of search algorithms registered to the time series database, based on one or more characteristics of the condition and historical statistic data of one or more historical searches conducted on the time series database, where:

the historical statistic data is associated with an efficiency of searching in a table of the time series database, using each of the search algorithms within the plurality of search algorithms,

the efficiency includes a time overhead describing an amount of time for returning one time point in a subsequence in an historical search result, and

selecting the search algorithm to perform the search includes selecting one of the plurality of search algorithms having a lowest time overhead as the search algorithm to perform the search; and

obtaining a search result from the time series database, utilizing the search algorithm.

2. The computer-implemented method according to claim 1 , wherein the efficiency further comprises a pruning ratio describing a ratio of a number of subsequences in an historical search result to a number of candidate subsequences returned from the time series database; and

selecting the search algorithm to perform the search further includes selecting one of the plurality of search algorithms having a highest pruning ratio as the search algorithm to perform the search.

3. The computer-implemented method according to claim 1 , further comprising: updating the historical statistic data based on statistic information collected during obtaining the search result from the time series database utilizing the search algorithm.

4. A computer-implemented method for searching in a database system, the method comprising:

receiving a search request to perform a search in a first database that is a time series database and a second database that is a relational database, where the time series database stores a plurality of sequences of measured values arranged in chronological order;

extracting from the search request a first search request to search in the first database and a second search request to search in the second database, where the first search request includes a target subsequence to be searched for within the plurality of sequences of measured values within the time series database;

searching in the first database using the first search request, including selecting a search algorithm to perform the search in the first database from a plurality of search algorithms registered to the time series database, based on one or more characteristics of the target subsequence and historical statistic data of one or more historical searches conducted on the time series database, where:

the historical statistic data is associated with an efficiency of searching in a table of the time series database, using each of the search algorithms within the plurality of search algorithms,

the efficiency includes a time overhead describing an amount of time for returning one time point in a subsequence in an historical search result, and

selecting the search algorithm to perform the search includes selecting one of the plurality of search algorithms having a lowest time overhead as the search algorithm to perform the search;

searching in the second database using the second search request; and

generating a search result to respond to the search request based on a first search result from the first database and a second search result from the second database.

5. The computer-implemented method according to claim 4 , wherein generating the search result to respond to the search request based on the first search result from the first database and the second search result from the second database comprises:

joining the first search result and the second search result to generate the search result.

6. The computer-implemented method according to claim 4 , wherein the search request is a request from a client, and the search result is generated by the database system.

7. An apparatus for searching in a database, where the apparatus:

receives a search request to perform a search in a time series database where the time series database stores a plurality of sequences of measured values arranged in chronological order;

extracts from the search request a condition for performing the search in the time series database, utilizing a processor, the condition including a target subsequence to be searched for within the plurality of sequences of measured values within the time series database;

selects a search algorithm to perform the search from a plurality of search algorithms registered to the time series database, utilizing the processor, based on one or more characteristics of the condition and historical statistic data of one or more historical searches conducted on the time series database, where:

the historical statistic data is associated with an efficiency of searching in a table of the time series database, using each of the search algorithms within the plurality of search algorithms,

the efficiency includes a time overhead describing an amount of time for returning one time point in a subsequence in an historical search result, and

selecting the search algorithm to perform the search includes selecting one of the plurality of search algorithms having a lowest time overhead as the search algorithm to perform the search, utilizing the processor; and

obtains, utilizing the processor, a search result from the time series database, utilizing the search algorithm.

8. The apparatus according to claim 7 , wherein the efficiency further comprises a pruning ratio describing a ratio of a number of subsequences in an historical search result to a number of candidate subsequences returned from the time series database; and

selecting the search algorithm to perform the search further includes selecting one of the plurality of search algorithms having a highest pruning ratio as the search algorithm to perform the search.

9. The apparatus according to claim 7 , where the apparatus further updates the historical statistic data based on statistic information that is collected during obtaining the search result from the time series database utilizing the search algorithm.

10. An apparatus for searching in a database system, where the apparatus:

receives a search request to perform a search in a first database that is a time series database and a second database that is a relational database, utilizing a processor, where the time series database stores a plurality of sequences of measured values arranged in chronological order;

extracts from the search request a first search request to search in the first database and a second search request to search in the second database, utilizing the processor, where the first search request includes a target subsequence to be searched for within the plurality of sequences of measured values within the time series database;

searches in the first database using the first search request, utilizing the processor, including selecting, utilizing the processor, a search algorithm to perform the search in the first database from a plurality of search algorithms registered to the time series database, based on one or more characteristics of the target subsequence and historical statistic data of one or more historical searches conducted on the time series database, where:

the historical statistic data is associated with an efficiency of searching in a table of the time series database, using each of the search algorithms within the plurality of search algorithms,

the efficiency includes a time overhead describing an amount of time for returning one time point in a subsequence in an historical search result, and

selecting the search algorithm to perform the search includes selecting, utilizing the processor, one of the plurality of search algorithms having a lowest time overhead as the search algorithm to perform the search;

searches in the second database using the second search request, utilizing the processor; and

generates a search result to respond to the search request based on a first search result from the first database and a second search result from the second database, utilizing the processor.

11. The apparatus according to claim 10 , wherein generating the search result includes

joining the first search result and the second search result.

12. The apparatus according to claim 10 , wherein the search request is a request from a client, and the apparatus generates the search result at the database system.

13. A computer program product for searching in a database, the computer program product comprising a computer readable storage medium having program instructions embodied therewith, the program instructions executable by a processor to cause the processor to:

receive a search request to perform a search in a time series database, where the time series database stores a plurality of sequences of measured values arranged in chronological order;

extract, by the processor, from the search request a condition for performing the search in the time series database, the condition including a target subsequence to be searched for within the plurality of sequences of measured values within the time series database;

select, by the processor, a search algorithm to perform the search from a plurality of search algorithms registered to the time series database, based on one or more characteristics of the condition and historical statistic data of one or more historical searches conducted on the database, where:

the historical statistic data is associated with an efficiency of searching in a table of the time series database, using each of the search algorithms within the plurality of search algorithms,

the efficiency includes a time overhead describing an amount of time for returning one time point in a subsequence in an historical search result, and

selecting the search algorithm to perform the search includes selecting, by the processor, one of the plurality of search algorithms having a lowest time overhead as the search algorithm to perform the search; and

obtain, by the processor, a search result from the time series database, utilizing the search algorithm.

14. The computer program product according to claim 13 , wherein the efficiency further comprises a pruning ratio describing a ratio of a number of subsequences in an historical search result to a number of candidate subsequences returned from the time series database; and

selecting the search algorithm to perform the search further includes selecting one of the plurality of search algorithms having a highest pruning ratio as the search algorithm to perform the search.

15. The computer program product according to claim 13 , further comprising: updating, by the processor, the historical statistic data based on statistic information collected during obtaining the search result from the time series database utilizing the search algorithm.

Assignments (1)
ASSIGNMENT OF ASSIGNOR'S INTEREST Recorded Nov 3, 2015
From: CHEN, YAO LIANG; CHEN, XIAO YAN; HUANG, SHENG; LIU, KAI; XU, XIAO MIN
To: INTERNATIONAL BUSINESS MACHINES CORPORATION
Reel/Frame 036952/0442 →
Priority Claims (1)
CN 2014 1 0714219 · Nov 28, 2014 · national
Continuity (1)
Related Publication 20160154852A1 · Jun 2, 2016
Cited By (1)
US 12,730,788