CN104572778A - Service database query statistical method - Google Patents

Service database query statistical method Download PDF

Info

Publication number
CN104572778A
CN104572778A CN201310517046.6A CN201310517046A CN104572778A CN 104572778 A CN104572778 A CN 104572778A CN 201310517046 A CN201310517046 A CN 201310517046A CN 104572778 A CN104572778 A CN 104572778A
Authority
CN
China
Prior art keywords
statistical
data
statistics
attribute field
increment
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN201310517046.6A
Other languages
Chinese (zh)
Inventor
不公告发明人
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Xi'an Qunfeng Electronic Information Technology Co ltd
Original Assignee
Xi'an Qunfeng Electronic Information Technology Co ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Xi'an Qunfeng Electronic Information Technology Co ltd filed Critical Xi'an Qunfeng Electronic Information Technology Co ltd
Priority to CN201310517046.6A priority Critical patent/CN104572778A/en
Publication of CN104572778A publication Critical patent/CN104572778A/en
Pending legal-status Critical Current

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/24Querying
    • G06F16/245Query processing
    • G06F16/2458Special types of queries, e.g. statistical queries, fuzzy queries or distributed queries
    • G06F16/2462Approximate or statistical queries

Landscapes

  • Engineering & Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • Probability & Statistics with Applications (AREA)
  • Theoretical Computer Science (AREA)
  • Computational Linguistics (AREA)
  • Software Systems (AREA)
  • Mathematical Physics (AREA)
  • Data Mining & Analysis (AREA)
  • Databases & Information Systems (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Fuzzy Systems (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

The invention provides a business database query statistical method, which comprises the following steps: adding a statistical attribute field in the service system; the business system creates a statistic increment table and a statistic increment history table; determining a statistic increment point, and inserting data into a statistic increment table at a corresponding service point; and the service system inquires the data of the statistic increment table and updates the statistic value of the statistic attribute field according to the data. The business database query statistical method provided by the invention can efficiently and accurately acquire statistical real-time data in database query application with large data volume.

Description

A kind of querying service database statistical method
Technical field
The present invention relates to a kind of computer realm, particularly relate to a kind of Service Database data query statistical method of increment type.
Background technology
At present, great majority based on the data statistics means of database application are: the directly statistics statement of performing database, draws statistics result in real time.This mode obtains statistics and simply, easily implements, and statistics real-time is high, accuracy is also high; But shortcoming is, can ample resources be taken when data volume is large, cause statistical efficiency not high.
So, be necessary propose a kind of new Service Database data query statistical method, with solve big data quantity data base querying application in, how effectively, Obtaining Accurate statistics real time data technical matters.
Summary of the invention
The object of the present invention is to provide a kind of querying service database statistical method, in the data base querying application of big data quantity, statistics real time data can be obtained efficiently and accurately.
In order to solve above technical matters, the invention provides a kind of querying service database statistical method, comprising:
Operation system increases statistical attribute field;
Operation system creates statistics increment list and statistics increment history lists;
Determine statistics increment point, in the service point of correspondence to statistics increment list data inserting;
The data of operation system query statistic increment list, according to the statistical value of described Data Update statistical attribute field.
Further, described operation system increases statistical attribute field, specifically comprises: operation system increases statistical attribute field, is to comprise statistical attribute field in the new statistical form created.
Further, described operation system increases statistical attribute field, specifically comprises: operation system increases statistical attribute field, is directly to add statistical attribute field in the table existed in operation system.
Further, the data of described operation system query statistic increment list, according to the statistical value of described Data Update statistical attribute field, specifically comprise:
Operation system sets up timed task, query statistic increment list data, finds corresponding statistical form record according to statistics increment list data;
The increment size of statistics increment list data is upgraded the statistical value of statistics attribute field;
By the data batchmove added up in statistics increment list to adding up in increment history lists.
Further, described method comprises further: operation system carries out business datum statistics.
Further, described operation system carries out business datum statistics, specifically comprises: initialization data storehouse statistical value; Enable the collection of incremental data; Start timed task, carry out data query statistics by query statistic attribute field.
Compared with prior art, the inventive method provides a kind of Service Database data query statistical method of increment type, adopt the method increasing statistical attribute field in operation system, the direct query statistic attribute field when query statistic data, just can obtain statistics simply efficiently, without the need to carrying out a large amount of statistics of database operations, improve the acquisition efficiency of the statistics of big data quantity system.
Accompanying drawing explanation
Accompanying drawing described herein is used to provide a further understanding of the present invention, forms a part of the present invention, and schematic description and description of the present invention, for explaining the present invention, does not form inappropriate limitation of the present invention.In the accompanying drawings:
Fig. 1 is the process flow diagram of a kind of querying service database statistical method provided by the invention.
Embodiment
In order to make technical matters to be solved by this invention, technical scheme and beneficial effect clearly, understand, below in conjunction with drawings and Examples, the present invention is further elaborated.Should be appreciated that specific embodiment described herein only in order to explain the present invention, be not intended to limit the present invention.
As shown in Figure 1, the invention provides a kind of querying service database statistical method, comprising:
Step 1: operation system increases statistical attribute field, can comprise statistical attribute field, the some former table that also can exist in operation system directly adds statistical attribute field in the new statistical form created.Which kind of mode tool not adopts can determine according to concrete service conditions.
Step 2: operation system creates statistics increment list and statistics increment history lists;
Step 3: determine statistics increment point, in the service point of correspondence to statistics increment list data inserting;
Step 4: the data of operation system query statistic increment list, according to the statistical value of this Data Update statistical attribute field, specifically comprises:
Operation system sets up timed task, query statistic increment list data, finds corresponding statistical form record according to statistics increment list data, and statistical form record does not exist then newly-increased statistical form record;
The increment size of statistics increment list data is upgraded the statistical value of statistics attribute field;
By the data batchmove added up in statistics increment list to adding up in increment history lists.
Step 5: operation system enables service data statistics.Specifically comprise:
Initialization data storehouse statistical value;
Enable the collection of incremental data;
Start timed task, carry out data query statistics by query statistic attribute field.
In above-mentioned steps, can exchange between step 1 and step 2.
Describe embodiments of the present invention in detail below in conjunction with embodiment, to the present invention, how application technology means solve technical matters whereby, and the implementation procedure reaching technique effect can fully understand and implement according to this.
In embodiments of the invention, adopt oracle database, for cyber dealing statistics, content of the present invention is described.In the present embodiment, specifically suppose:
1, the Back ground Information of each user forms a record, and every bar records unique key assignments indicating it;
2, the Back ground Information of every part commodity forms a record, and every bar records unique key assignments indicating it;
3, also form a record during user's free choice of goods, every bar record also has unique key assignments indicating it;
4, concrete statistical demand: 1) user buys commodity total quantity; 2) quantity statistics sold of commodity.
According to querying service database statistical method provided by the invention, comprising:
The first step, operation system creates statistical form, and this statistical form comprises statistical attribute field.In the present embodiment, create respectively with user be masters statistical form and take commodity as the statistical form of masters, all comprise statistical attribute field in these two statistical forms:
Second step: operation system creates statistics increment list and statistics increment history lists;
3rd step: buy in the logic of commodity operation system user, adds new service logic: buy successfully backward statistics increment list and insert two data: user buys the quantity that commodity amount and commodity are sold;
4th step: operation system sets up timed task, once, service logic is as follows in execution per second: query statistic increment list data, and find corresponding statistical form record according to statistics increment list data record, statistical form record does not exist then newly-increased statistical form record; The increment size of statistics increment list data is updated to statistical form, then will adds up increment list data batchmove in statistics increment history lists.
5th step: stop, upgrading staging business system, initialization statistics, restarts operation system, starts timed task, carries out data query statistics by query statistic attribute field.
Above-mentioned explanation illustrates and describes the preferred embodiments of the present invention, but as previously mentioned, be to be understood that the present invention is not limited to the form disclosed by this paper, should not regard the eliminating to other embodiments as, and can be used for other combinations various, amendment and environment, and can in invention contemplated scope described herein, changed by the technology of above-mentioned instruction or association area or knowledge.And the change that those skilled in the art carry out and change do not depart from the spirit and scope of the present invention, then all should in the protection domain of claims of the present invention.

Claims (2)

1. a querying service database statistical method, is characterized in that, comprising:
Operation system increases statistical attribute field;
Operation system creates statistics increment list and statistics increment history lists;
Determine statistics increment point, in the service point of correspondence to statistics increment list data inserting;
The data of operation system query statistic increment list, according to the statistical value of described Data Update statistical attribute field.
2. the method for claim 1, is characterized in that, described operation system increases statistical attribute field, specifically comprises: operation system increases statistical attribute field, is to comprise statistical attribute field in the new statistical form created.
CN201310517046.6A 2013-10-27 2013-10-27 Service database query statistical method Pending CN104572778A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201310517046.6A CN104572778A (en) 2013-10-27 2013-10-27 Service database query statistical method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201310517046.6A CN104572778A (en) 2013-10-27 2013-10-27 Service database query statistical method

Publications (1)

Publication Number Publication Date
CN104572778A true CN104572778A (en) 2015-04-29

Family

ID=53088854

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201310517046.6A Pending CN104572778A (en) 2013-10-27 2013-10-27 Service database query statistical method

Country Status (1)

Country Link
CN (1) CN104572778A (en)

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105069096A (en) * 2015-08-06 2015-11-18 厦门二五八集团有限公司 Architecture method and architecture system for user-defined worksheet
CN106294090A (en) * 2016-08-03 2017-01-04 五八同城信息技术有限公司 A kind of data statistical approach and device
CN108241725A (en) * 2017-05-24 2018-07-03 新华三大数据技术有限公司 A kind of data hot statistics system and method
CN110050268A (en) * 2016-09-30 2019-07-23 深圳市华傲数据技术有限公司 Data processing method and device based on increment
CN112150248A (en) * 2020-09-30 2020-12-29 欧冶云商股份有限公司 Method, system and device for counting hung goods amount based on batch flow fusion

Cited By (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105069096A (en) * 2015-08-06 2015-11-18 厦门二五八集团有限公司 Architecture method and architecture system for user-defined worksheet
CN106294090A (en) * 2016-08-03 2017-01-04 五八同城信息技术有限公司 A kind of data statistical approach and device
CN110050268A (en) * 2016-09-30 2019-07-23 深圳市华傲数据技术有限公司 Data processing method and device based on increment
CN108241725A (en) * 2017-05-24 2018-07-03 新华三大数据技术有限公司 A kind of data hot statistics system and method
CN112150248A (en) * 2020-09-30 2020-12-29 欧冶云商股份有限公司 Method, system and device for counting hung goods amount based on batch flow fusion
CN112150248B (en) * 2020-09-30 2021-08-03 欧冶云商股份有限公司 Method, system and device for counting hung goods amount based on batch flow fusion

Similar Documents

Publication Publication Date Title
CN104572778A (en) Service database query statistical method
CN108647357B (en) Data query method and device
CN105224343A (en) A kind of renewal reminding method of application program and device
CN105117402B (en) Daily record data sharding method and device
CN108415964A (en) Tables of data querying method, device, terminal device and storage medium
US20150222717A1 (en) Apparatus and method for updating ip geographic information
CN103778133A (en) Database object changing method and device
CN102591880A (en) Information providing method and device
CN104994424A (en) Method and device for constructing audio/video standard data set
CN104657387A (en) Data query method and device
CN103365928A (en) Information recommendation method and information recommendation device
CN102799651B (en) Query processing device and method
CN104636401A (en) Method and device for data rollback of SCADA (supervisory control and data acquisition) system
CN102332026A (en) Inquiring statistical method for service database
CN104182826A (en) A method and an apparatus for processing allocation data
CN102508884A (en) Method and device for acquiring hotpot events and real-time comments
CN104991964A (en) Year-to-year rate and month-to-month rate calculation method based on time dimension
CN102521304A (en) Hash based clustered table storage method
CN104123303A (en) Method and device for providing data
CN104866425A (en) Database pressure testing method
CN106919607B (en) Data access method, device and system
CN110737432A (en) script aided design method and device based on root list
US9223460B2 (en) Toolbar search centered user interface model
WO2024183193A1 (en) Data processing method and apparatus for fpga components, and electronic device
CN103279420A (en) Optimized automation testing method and system for application program of mobile terminal

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
WD01 Invention patent application deemed withdrawn after publication

Application publication date: 20150429