A database archiving and retrieving method, comprising:
- selecting at least one record group including a plurality of records from an original table of a database from which data is archivable, based on selection information on at least one of a time and a field value;
- when a record group in the at least one selected record group has records the number of which exceeds a predetermined threshold value, dividing the record group into a plurality of record groups such that each of the plurality of divided record groups has records the number of which is equal to or smaller than the predetermined threshold value;
- storing group compression data compressed to be created for every record group and the selection information corresponding to the group compression data in a compression table of the database, with respect to each of at least one selected record group;
- receiving a retrieving condition for retrieving records from the compression table;
- determining a number of database (DB) retrieving processes for retrieving the records in parallel, based on a performance of a computer which is configured to perform retrieval and the number of group compression data corresponding to the selection information satisfying the retrieving condition;
- and
- retrieving the records satisfying the retrieving condition in parallel, based on the determined number of DB retrieving processes,
- wherein the determining of the number of DB retrieving processes includes:
- collecting computer performance information on at least one of a number of central processing units (CPUs) included in the computer, a capacity of a memory, and an input/output speed of a storage device;
- determining the number of group compression data corresponding to the selection information satisfying the received retrieving condition among the group compression data stored in the compression table;
- and
- determining the number of DB retrieving processes for retrieving the records in parallel, based on the collected computer performance information and the determined number of group compression data,
- wherein the retrieving of the records satisfying the retrieving condition in parallel includes:
- allocating at least one group compression data to each of the determined number of DB retrieving processes, based on the number of group compression data corresponding to the selection information satisfying the retrieving condition, so that all of the group compression data are allocated to all of the DB retrieving processes:
- and
- decompressing the at least one group compression data which is allocated for every DB retrieving process and retrieving the records satisfying the retrieving condition in parallel.