CN106557494A - Update the method and device of row storage table - Google Patents

Update the method and device of row storage table Download PDF

Info

Publication number
CN106557494A
CN106557494A CN201510624998.7A CN201510624998A CN106557494A CN 106557494 A CN106557494 A CN 106557494A CN 201510624998 A CN201510624998 A CN 201510624998A CN 106557494 A CN106557494 A CN 106557494A
Authority
CN
China
Prior art keywords
data
row storage
row
storage table
data volume
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.)
Granted
Application number
CN201510624998.7A
Other languages
Chinese (zh)
Other versions
CN106557494B (en
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.)
Beijing Gridsum Technology Co Ltd
Original Assignee
Beijing Gridsum 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 Beijing Gridsum Technology Co Ltd filed Critical Beijing Gridsum Technology Co Ltd
Priority to CN201510624998.7A priority Critical patent/CN106557494B/en
Publication of CN106557494A publication Critical patent/CN106557494A/en
Application granted granted Critical
Publication of CN106557494B publication Critical patent/CN106557494B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

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/21Design, administration or maintenance of databases
    • 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/22Indexing; Data structures therefor; Storage structures
    • G06F16/221Column-oriented storage; Management thereof

Abstract

The invention discloses a kind of method and device for updating row storage table.Wherein, the method includes:Obtain the data volume of currently stored data in the current data volume of deleted data and the row storage table of database in the row storage table of database;The current data volume of deleted data and the data volume of currently stored data according to obtaining determines whether to update the row storage index in row storage table.The present invention solves row memory response time delay and the low technical problem of row storage efficiency that the data volume in correlation technique in row storage is caused due to only reaching the data volume that can just change during predetermined threshold value in storage in column.

Description

Update the method and device of row storage table
Technical field
The present invention relates to database field, in particular to a kind of method and device for updating row storage table.
Background technology
Row storage index can save the occupancy to storage space of database, so as to be lifted by arranging storage compress technique Database performance.
In the related, row storing process can be divided into 3 stages, respectively:(1) to the number in row storage table According to by row packet, multiple so-called row groups are obtained, each row group can accommodate 102,400 to 1,048,576 data OK;(2) each row group is cut into into multiple column-slice sections by row;(3) after by each column-slice section compression, as row storage In the actual row storage table of index insertion.
For above-mentioned row storing process, on the one hand, when dividing row group, the line number that may there is row storage table is unsatisfactory for The situation of the lowest term that row group is divided, the such as current line number in row storage table are less than 102,400, now, database This partial data can be stored in the form of traditional row storage is so-called interim row storage DeltaStore directly, until number According to till rising to satisfaction row group division condition;On the other hand, row storage conversion is stored in column, depends only on SQL The judged result of Server background threads, i.e. data are expert in storage table and are accumulated, and allow until number of data lines reaches row group Line number when, just by row storage conversion store in column.Specifically, data are expert in storage table and are accumulated, until data row When number reaches the line number that row group is allowed, the row group echo can be just "Off" state, now, name by SQL Server Background process for " tuple-mover " can just be searched buttoned-up row group and compress it fragment in column, and then by phase The column-slice section answered is stored in row storage table.
Therefore, above-mentioned row storing process has that background process response time delay, row storage efficiency be low, storage space of database Take the defects such as expense is big, inquiry is slow.
For above-mentioned problem, effective solution is not yet proposed at present.
The content of the invention
A kind of method and device for updating row storage table is embodiments provided, at least to solve row in correlation technique The row that data volume in storage is caused due to only reaching the data volume that can just change during predetermined threshold value in storage in column are deposited Storage response time delay and the low technical problem of row storage efficiency.
A kind of one side according to embodiments of the present invention, there is provided method of renewal row storage table, including:Obtain number According to currently stored number in the current data volume of deleted data in the row storage table in storehouse and the row storage table of above-mentioned database According to data volume;According to the data volume and the data of above-mentioned currently stored data of above-mentioned current the deleted data for obtaining Amount determines whether to update the row storage index in above-mentioned row storage table.
Further, the data volume and the number of above-mentioned currently stored data according to above-mentioned current the deleted data for obtaining Determine whether that updating the row storage index in above-mentioned row storage table includes according to amount:Judge the number of above-mentioned current deleted data Whether the data volume corresponding line number of above-mentioned currently stored data is less than or equal to according to the corresponding line number of amount;In judged result In the case of being, the above-mentioned row storage index in above-mentioned row storage table is updated.
Further, whether work as less than or equal to above-mentioned in the corresponding line number of data volume for judging above-mentioned current deleted data After the corresponding line number of data volume of front institute's data storage, said method also includes:In the case where judged result is no, Detect whether the corresponding line number of data volume of accumulation data storage in the above-mentioned row storage table of above-mentioned database reaches above-mentioned working as The corresponding line number of data volume of front deleted data;In the case of being to be in testing result, update in above-mentioned row storage table Above-mentioned row storage index.
Further, the data volume and above-mentioned database of current deleted data in the row storage table for obtaining database In row storage table before the data volume of currently stored data, said method also includes:Detect whether to there occurs for deleting Except the deletion action of the data in above-mentioned row storage table, wherein, in testing result for, in the case of being, execution obtains number According to currently stored number in the current data volume of deleted data in the row storage table in storehouse and the row storage table of above-mentioned database According to data volume the step of.
Further, after detecting whether to there occurs for deleting the deletion action of the data in above-mentioned row storage table, Said method also includes:In the case where testing result is no, the above-mentioned row storage table of above-mentioned database is further detected Whether the corresponding line number of data volume of middle accumulation data reaches default row group divides threshold value;Reach in testing result above-mentioned pre- If row group divides threshold value, the row storage index in above-mentioned row storage table is updated.
Another aspect according to embodiments of the present invention, additionally provides a kind of device for updating row storage table, including:Obtain Unit, the capable of data volume and above-mentioned database for obtaining current deleted data in the row storage table of database are stored The data volume of currently stored data in table;Determining unit, for the number according to above-mentioned current the deleted data for obtaining Determine whether to update the row storage index in above-mentioned row storage table according to the data volume of amount and above-mentioned currently stored data.
Further, above-mentioned determining unit includes:Judge module, for judging the data of above-mentioned current deleted data Measure the corresponding line number of data volume whether corresponding line number is less than or equal to above-mentioned currently stored data;First update module, For indexing for the above-mentioned row storage in the case of being, updated in above-mentioned row storage table in judged result.
Further, above-mentioned determining unit also includes:Detection module, for judging above-mentioned current deleted data After whether the corresponding line number of data volume is less than or equal to the corresponding line number of data volume of above-mentioned currently stored data, sentencing In the case that disconnected result is no, the data volume correspondence of accumulation data storage in the above-mentioned row storage table of above-mentioned database is detected Line number whether reach the corresponding line number of data volume of above-mentioned current deleted data;Second update module, in inspection Result is surveyed in the case of being, to update the above-mentioned row storage index in above-mentioned row storage table.
Further, said apparatus also include:First detector unit, for obtain database row storage table in when In the row storage table of the data volume and above-mentioned database of front deleted data before the data volume of currently stored data, inspection Whether survey is there occurs for deleting the deletion action of the data in above-mentioned row storage table, wherein, above-mentioned acquiring unit is also used In the case of being to be in testing result, the data volume of current deleted data in the row storage table for obtaining database is performed With the function of the data volume of currently stored data in the row storage table of above-mentioned database.
Further, said apparatus also include:Second detector unit, for detecting whether to there occurs for deletion After stating the deletion action of data in row storage table, in testing result in the case of no, further to detect above-mentioned number Threshold value is divided according to whether the corresponding line number of data volume of accumulation data in the above-mentioned row storage table in storehouse reaches default row group;More New unit, for when testing result reaches above-mentioned default row group and divides threshold value, the row updated in above-mentioned row storage table are deposited Storage index.
In embodiments of the present invention, using the triggering row storage conversion when deleting, have modified the data storage in row storage To arrange the mode of storage, by the data volume and database of current deleted data in the row storage table of acquisition database The data volume of currently stored data in row storage table;According to data volume and the current institute of current the deleted data for obtaining The data volume of data storage determines whether to update the row storage index in row storage table, has reached reduction row memory response and has prolonged When purpose, it is achieved thereby that improve the technique effect of row storage efficiency, and then solve in correlation technique in row storage Data volume can just change data volume in storage in column during predetermined threshold value and the row memory response that causes due to only reaching Time delay and the low technical problem of row storage efficiency.
Description of the drawings
Accompanying drawing described herein is used for providing a further understanding of the present invention, constitutes the part of the application, this Bright schematic description and description does not constitute inappropriate limitation of the present invention for explaining the present invention.In accompanying drawing In:
Fig. 1 is the flow chart of the method for a kind of optional renewal row storage table according to embodiments of the present invention;And
Fig. 2 is the schematic diagram of the device of a kind of optional renewal row storage table according to embodiments of the present invention.
Specific embodiment
In order that those skilled in the art more fully understand the present invention program, below in conjunction with the embodiment of the present invention Accompanying drawing, is clearly and completely described to the technical scheme in the embodiment of the present invention, it is clear that described embodiment The only embodiment of a present invention part, rather than the embodiment of whole.Based on the embodiment in the present invention, ability The every other embodiment obtained under the premise of creative work is not made by domain those of ordinary skill, should all belong to The scope of protection of the invention.
It should be noted that description and claims of this specification and the term " first " in above-mentioned accompanying drawing, " Two " it is etc. for distinguishing similar object, without for describing specific order or precedence.It should be appreciated that this The data that sample is used can be exchanged in the appropriate case, so as to embodiments of the invention described herein can with except Here the order beyond those for illustrating or describing is implemented.Additionally, term " comprising " and " having " and they Any deformation, it is intended that cover non-exclusive process, the side for including, for example, containing series of steps or unit Method, system, product or equipment are not necessarily limited to those steps clearly listed or unit, but may include unclear List or other intrinsic for these processes, method, product or equipment step or unit.
Embodiment 1
According to embodiments of the present invention, there is provided it is a kind of update row storage table method embodiment, it should be noted that Can perform in the such as computer system of one group of computer executable instructions the step of the flow process of accompanying drawing is illustrated, And, although show logical order in flow charts, but in some cases, can be with suitable different from herein Sequence performs shown or described step.
Fig. 1 is the flow chart of the method for a kind of optional renewal row storage table according to embodiments of the present invention, such as Fig. 1 institutes Show, the method comprises the steps:
Step S102, obtains the row storage of the data volume and database of current deleted data in the row storage table of database The data volume of currently stored data in table;
Step S104, determines according to the data volume of the data volume and currently stored data of current the deleted data for obtaining Whether row storage index in row storage table is updated.
As the Statistics table in database can store metadata, such as sysindexes, wherein, metadata includes row Digital section Rows, therefore above-mentioned Statistics table can be inquired about by statistics collection module, can obtain by database table Increase, delete and DeltaStore that modification brings the data volume data volume of interim storage (at once in storage table) and Deleted data volumes (data volume deleted from row storage list).In addition, Statistics table does not have in database When upgrading in time, can also be operated by SELECT COUNT, increase, deleting and modification behaviour according to database table Data volume comparing result before and after work, draws the data volume of the data volume and Deleted of DeltaStore.
With the data accumulation for needing to be expert in storage table in correlation technique to default row group divide threshold value when, can just trigger by Packet, the operation logic for compressing, dumping in row storage table in row storage table is compared, and is sent out in row storage table Raw data are deleted, modification is just triggered the packet in row storage table, compresses, dumps in row storage table when operating Operation logic, can effectively make up the defect of SQL Server database itself update mechanisms, customization detection data is more The frequency of new amount, to being compressed condition adjudgement with the data for arranging storage, and then is compressed operation.
By above-described embodiment, it is possible to achieve reduce the purpose of row memory response time delay, it is achieved thereby that improving row storage The technique effect of efficiency.
Alternatively, being determined according to the data volume of the data volume and currently stored data of current the deleted data for obtaining is The no row storage index updated in row storage table includes:
S2, judges whether the corresponding line number of data volume of current deleted data is less than or equal to the number of currently stored data According to the corresponding line number of amount;
S4, indexes for the row storage in the case of being, updated in row storage table in judged result.
For example, it is assumed that line number differences of the DeltaStore of system record between running twice is RowsDiff1=(CurrentRows1–PrevRows1), line number differences of the Deleted between running twice is RowsDiff2=(CurrentRows2–PrevRows2), if RowsDiff1≥RowsDiff2, then can update row and deposit Row storage index in storage table, and if RowsDiff1< RowsDiff2, then the row that can not be updated in row storage table deposit Storage index.
For example, it is assumed that a row group includes 102400 rows, delete in row group A from row storage table due to performing modification operation Except 2400 rows, and if now 2500 row data of interim storage in row storage table, can be by row storage table 2400 row data of interim storage are compressed and are recombinated with remaining 100000 row data in row group A, are deposited with updating row Respective column storage index in storage table;And if now 2300 row data of interim storage in row storage table, due to 2300 Row is not up to the default row threshold value 102400 of row group with 100000 row data sums, therefore will cannot face in row storage table When store 2300 row data and be compressed and recombinate with remaining 100000 row data in row group A, so as to trigger Update the operation of the respective column storage index in row storage table.
Specifically, when the row storage in row storage table is updated is indexed, row storage index upgrade module, row can be called The Main Function of storage index upgrade module is triggering index upgrade order Rebuild.Row storage index upgrade module is touched Index upgrade is sent out, order example is as follows:ALTER INDEX index_name ON table_name REBUILD.
By the embodiment of the present invention, whether the data volume that can accurately determine interim storage in row storage can supplement row The data volume deleted in storage, and then can timely and accurately update the storage index of the respective column in row storage table.
Alternatively, whether currently stored number is less than or equal in the corresponding line number of data volume for judging current deleted data According to the corresponding line number of data volume after, said method also includes:
S6, in the case where judged result is no, the data volume of accumulation data storage in the row storage table of Test database Whether corresponding line number reaches the corresponding line number of data volume of current deleted data;
S8, indexes for the row storage in the case of being, updated in row storage table in testing result.
That is, in the case where judged result is no, can be with accumulation storage number in the row storage table in real-time detector data storehouse According to the corresponding line number of data volume whether reach the corresponding line number of data volume of current deleted data, in testing result be In the case of being, the row storage index in row storage table is updated.
For example, it is assumed that a row group includes 102400 rows, delete in row group A from row storage table due to performing modification operation Except 2400 rows, and if now 2300 row data of interim storage in row storage table, it is impossible to will face in row storage table When store 2300 row data and be compressed and recombinate with remaining 100000 row data in row group A, so as to trigger The operation of the respective column storage index in row storage table is updated, at this point it is possible in a period of time interior real-time detection Whether the accumulation line number of DeltaStore reaches 2400, if reaching 2400, updates the row storage rope in row storage table Draw.
When the embodiment divides threshold value with the data accumulation in row storage table to default row group, row is deposited by just triggering Packet, the operation logic for compressing, dumping in row storage table in storage table is compared, as long as the number in row storage table Run up to row the deleted data volume of group that deletion action occurs in row storage table to can trigger and update in row storage table according to amount Row storage index operation, reduce row storage operation delay so that update it is more timely.
Alternatively, in the row storage table for obtaining database, the row of the data volume and database of current deleted data is stored In table before the data volume of currently stored data, said method also includes:
S10, detects whether to there occurs for deleting the deletion action of the data in row storage table, wherein, in testing result In the case of being, the data volume and the row of database of current deleted data in the row storage table for obtaining database are performed In storage table the step of the data volume of currently stored data.
By the embodiment of the present invention, on the one hand, when row storage table occurs data deletion action, this can be upgraded in time Row storage index in row storage table;On the other hand, can avoid that data deletion action does not occur due to row storage table And system is caused system burden to increase, is frequently detecting whether to perform row storage index upgrade operation always The defect of the system wasting of resources.
Alternatively, after detecting whether to there occurs for deleting the deletion action of the data in row storage table, above-mentioned side Method also includes:
S12, in the case where testing result is no, the data of accumulation data in the row storage table of further Test database Measure whether corresponding line number reaches default row group division threshold value;
S14, when testing result reaches default row group and divides threshold value, updates the row storage index in row storage table.
By the embodiment of the present invention, either increase line number of the data in DeltaStore newly and exceed default row group division threshold During value, or cause appearance greatly due to perform renewal Update operations or deleting Delete operations in row storage table After amount is designated the data of deleted so that the line number in row group divides threshold value well below default row group, all The row storage index that can be upgraded in time in row storage, so as to improve the efficiency of row storage, and can prevent database When data in row storage table are not deleted or change always, it is impossible to which the data in triggering row storage are converted in row storage Data and cause row storage index upgrade defect not in time.
The present invention is using in database, to row storage table and the real-time detection of row storage table, statistics increases, is deleted or modified DeltaStore the and deleted data volumes that operation brings, remove in DeltaStore data volumes with row storage table After deleted data volumes remaining data volume sum reach setting row group divide threshold value and SQL Server are not carried out During compression restructuring, it is indexed automatically reconstruction to trigger compression restructuring, overcomes due to the SQL Server renewals of itself Mechanism not in time, and causes the compression efficiency for arranging storage relatively low and the space hold expense thus brought is big and inquiry Slow defect.
Embodiment 2
According to embodiments of the present invention, there is provided a kind of embodiment of the device for updating row storage table.
Fig. 2 is the schematic diagram of the device of a kind of optional renewal row storage table according to embodiments of the present invention, such as Fig. 2 institutes Show, the device includes:Acquiring unit 202, for obtaining the number of current deleted data in the row storage table of database According to the data volume of currently stored data in the row storage table of amount and database;Determining unit 204, for according to acquisition The current data volume of deleted data and the data volume of currently stored data determine whether update row storage table in row Storage index.
As the Statistics table in database can store metadata, such as sys indexes, wherein, metadata includes row Digital section Rows, therefore above-mentioned Statistics table can be inquired about by statistics collection module, can obtain by database table Increase, delete and DeltaStore that modification brings the data volume data volume of interim storage (at once in storage table) and Deleted data volumes (data volume deleted from row storage list).In addition, Statistics table does not have in database When upgrading in time, can also be operated by SELECT COUNT, increase, deleting and modification behaviour according to database table Data volume comparing result before and after work, draws the data volume of the data volume and Deleted of DeltaStore.
With the data accumulation for needing to be expert in storage table in correlation technique to default row group divide threshold value when, can just trigger by Packet, the operation logic for compressing, dumping in row storage table in row storage table is compared, and is sent out in row storage table Raw data are deleted, modification is just triggered the packet in row storage table, compresses, dumps in row storage table when operating Operation logic, can effectively make up the defect of SQL Server database itself update mechanisms, customization detection data is more The frequency of new amount, to being compressed condition adjudgement with the data for arranging storage, and then is compressed operation.
By above-described embodiment, it is possible to achieve reduce the purpose of row memory response time delay, it is achieved thereby that improving row storage The technique effect of efficiency.
Optionally it is determined that unit includes:Judge module, for judging the corresponding row of data volume of current deleted data Whether number is less than or equal to the corresponding line number of data volume of currently stored data;First update module, for judging knot Fruit is indexed for the row storage in the case of being, updated in row storage table.
For example, it is assumed that line number differences of the DeltaStore of system record between running twice is RowsDiff1=(CurrentRows1–PrevRows1), line number differences of the Deleted between running twice is RowsDiff2=(CurrentRows2–PrevRows2), if RowsDiff1≥RowsDiff2, then can update row and deposit Row storage index in storage table, and if RowsDiff1< RowsDiff2, then the row that can not be updated in row storage table deposit Storage index.
For example, it is assumed that a row group includes 102400 rows, delete in row group A from row storage table due to performing modification operation Except 2400 rows, and if now 2500 row data of interim storage in row storage table, can be by row storage table 2400 row data of interim storage are compressed and are recombinated with remaining 100000 row data in row group A, are deposited with updating row Respective column storage index in storage table;And if now 2300 row data of interim storage in row storage table, due to 2300 Row is not up to the default row threshold value 102400 of row group with 100000 row data sums, therefore will cannot face in row storage table When store 2300 row data and be compressed and recombinate with remaining 100000 row data in row group A, so as to trigger Update the operation of the respective column storage index in row storage table.
Specifically, when the row storage in row storage table is updated is indexed, row storage index upgrade module, row can be called The Main Function of storage index upgrade module is triggering index upgrade order Rebuild.Row storage index upgrade module is touched Index upgrade is sent out, order example is as follows:ALTER INDEX index_name ON table_name REBUILD.
By the embodiment of the present invention, whether the data volume that can accurately determine interim storage in row storage can supplement row The data volume deleted in storage, and then can timely and accurately update the storage index of the respective column in row storage table.
Optionally it is determined that unit also includes:Detection module, for judging the data volume correspondence of current deleted data Line number whether less than or equal to the corresponding line number of data volume of currently stored data after, in the feelings that judged result is no Under condition, in the row storage table of Test database, whether the corresponding line number of data volume of accumulation data storage reaches and is currently deleted Except the corresponding line number of the data volume of data;Second update module, in the case of being to be in testing result, updates row Row storage index in storage table.
That is, in the case where judged result is no, can be with accumulation storage number in the row storage table in real-time detector data storehouse According to the corresponding line number of data volume whether reach the corresponding line number of data volume of current deleted data, in testing result be In the case of being, the row storage index in row storage table is updated.
For example, it is assumed that a row group includes 102400 rows, delete in row group A from row storage table due to performing modification operation Except 2400 rows, and if now 2300 row data of interim storage in row storage table, it is impossible to will face in row storage table When store 2300 row data and be compressed and recombinate with remaining 100000 row data in row group A, so as to trigger The operation of the respective column storage index in row storage table is updated, at this point it is possible in a period of time interior real-time detection Whether the accumulation line number of DeltaStore reaches 2400, if reaching 2400, updates the row storage rope in row storage table Draw.
When the embodiment divides threshold value with the data accumulation in row storage table to default row group, row is deposited by just triggering Packet, the operation logic for compressing, dumping in row storage table in storage table is compared, as long as the number in row storage table Run up to row the deleted data volume of group that deletion action occurs in row storage table to can trigger and update in row storage table according to amount Row storage index operation, reduce row storage operation delay so that update it is more timely.
Alternatively, device also includes:First detector unit, for currently being deleted in the row storage table for obtaining database Before except the data volume of currently stored data in the row storage table of the data volume and database of data, detect whether occur For deleting the deletion action of the data in row storage table, wherein, acquiring unit is additionally operable in testing result as yes In the case of, perform the data volume and the row storage table of database of current deleted data in the row storage table for obtaining database In currently stored data data volume function.
By the embodiment of the present invention, on the one hand, when row storage table occurs data deletion action, this can be upgraded in time Row storage index in row storage table;On the other hand, can avoid that data deletion action does not occur due to row storage table And system is caused system burden to increase, is frequently detecting whether to perform row storage index upgrade operation always The defect of the system wasting of resources.
Alternatively, device also includes:Second detector unit, for detecting whether to there occurs for deleting row storage table In data deletion action after, in testing result in the case of no, the row storage table of further Test database Whether the corresponding line number of data volume of middle accumulation data reaches default row group divides threshold value;Updating block, in detection When as a result reaching default row group division threshold value, the row storage index in row storage table is updated.
By the embodiment of the present invention, either increase line number of the data in DeltaStore newly and exceed default row group division threshold During value, or cause appearance greatly due to perform renewal Update operations or deleting Delete operations in row storage table After amount is designated the data of deleted so that the line number in row group divides threshold value well below default row group, all The row storage index that can be upgraded in time in row storage, so as to improve the efficiency of row storage, and can prevent database When data in row storage table are not deleted or change always, it is impossible to which the data in triggering row storage are converted in row storage Data and cause row storage index upgrade defect not in time.
The present invention is using in database, to row storage table and the real-time detection of row storage table, statistics increases, is deleted or modified DeltaStore the and deleted data volumes that operation brings, remove in DeltaStore data volumes with row storage table After deleted data volumes remaining data volume sum reach setting row group divide threshold value and SQL Server are not carried out During compression restructuring, it is indexed automatically reconstruction to trigger compression restructuring, overcomes due to the SQL Server renewals of itself Mechanism not in time, and causes the compression efficiency for arranging storage relatively low and the space hold expense thus brought is big and inquiry Slow defect.
The embodiments of the present invention are for illustration only, do not represent the quality of embodiment.
In the above embodiment of the present invention, the description to each embodiment all emphasizes particularly on different fields, and does not have in certain embodiment The part of detailed description, may refer to the associated description of other embodiment.
In several embodiments provided herein, it should be understood that disclosed technology contents, other can be passed through Mode realize.Wherein, device embodiment described above is only schematic, such as division of described unit, Can be a kind of division of logic function, when actually realizing, can have other dividing mode, such as multiple units or component Can with reference to or be desirably integrated into another system, or some features can be ignored, or not perform.It is another, institute The coupling each other for showing or discussing or direct-coupling or communication connection can be by some interfaces, unit or mould The INDIRECT COUPLING of block or communication connection, can be electrical or other forms.
The unit as separating component explanation can be or may not be it is physically separate, it is aobvious as unit The part for showing can be or may not be physical location, you can local to be located at one, or can also be distributed to On multiple units.Some or all of unit therein can be selected according to the actual needs to realize this embodiment scheme Purpose.
In addition, each functional unit in each embodiment of the invention can be integrated in a processing unit, it is also possible to It is that unit is individually physically present, it is also possible to which two or more units are integrated in a unit.It is above-mentioned integrated Unit both can be realized in the form of hardware, it would however also be possible to employ the form of SFU software functional unit is realized.
If the integrated unit realized using in the form of SFU software functional unit and as independent production marketing or use when, Can be stored in a computer read/write memory medium.Based on such understanding, technical scheme essence On all or part of part that in other words prior art is contributed or the technical scheme can be with software product Form is embodied, and the computer software product is stored in a storage medium, is used so that one including some instructions Platform computer equipment (can be personal computer, server or network equipment etc.) performs each embodiment institute of the invention State all or part of step of method.And aforesaid storage medium includes:USB flash disk, read-only storage (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), portable hard drive, magnetic disc or CD Etc. it is various can be with the medium of store program codes.
The above is only the preferred embodiment of the present invention, it is noted that for the ordinary skill people of the art For member, under the premise without departing from the principles of the invention, some improvements and modifications can also be made, these improve and moisten Decorations also should be regarded as protection scope of the present invention.

Claims (10)

1. it is a kind of update row storage table method, it is characterised in that include:
Obtain the data volume and the row storage table of the database of current deleted data in the row storage table of database In currently stored data data volume;
It is true according to the data volume of the data volume and the currently stored data of described current the deleted data for obtaining The fixed row storage index whether updated in the row storage table.
2. method according to claim 1, it is characterised in that according to the number of described current the deleted data for obtaining Determine whether to update the row storage index in the row storage table according to the data volume of amount and the currently stored data Including:
Judge the corresponding line number of data volume of current the deleted data whether less than or equal to described currently stored The corresponding line number of data volume of data;
Index for the row storage in the case of being, updated in the row storage table in judged result.
3. method according to claim 2, it is characterised in that in the data volume for judging current the deleted data After whether corresponding line number is less than or equal to the corresponding line number of data volume of the currently stored data, the side Method also includes:
In the case where judged result is no, accumulation data storage in the row storage table of the database is detected The corresponding line number of data volume whether reach the corresponding line number of data volume of current the deleted data;
Index for the row storage in the case of being, updated in the row storage table in testing result.
4. method according to claim 1, it is characterised in that currently deleted in the row storage table for obtaining database It is before except the data volume of currently stored data in the row storage table of the data volume and the database of data, described Method also includes:
Detect whether to there occurs for deleting the deletion action of the data in the row storage table,
Wherein, in the case of being to be in testing result, currently deleted in performing the row storage table for obtaining database In the row storage table of the data volume of data and the database the step of data volume of currently stored data.
5. method according to claim 4, it is characterised in that deposit for deleting the row detecting whether there occurs After the deletion action of the data in storage table, methods described also includes:
In the case where testing result is no, cumulative number in the row storage table of the database is further detected According to the corresponding line number of data volume whether reach default row group and divide threshold value;
When testing result reaches the default row group and divides threshold value, the row storage rope in the row storage table is updated Draw.
6. it is a kind of update row storage table device, it is characterised in that include:
Acquiring unit, for obtaining the data volume and the number of current deleted data in the row storage table of database According to the data volume of currently stored data in the row storage table in storehouse;
Determining unit, for according to the data volume of described current deleted data for obtaining and described currently stored The data volume of data determines whether to update the row storage index in the row storage table.
7. device according to claim 6, it is characterised in that the determining unit includes:
Judge module, for judging whether the corresponding line number of data volume of current the deleted data is less than or equal to The corresponding line number of data volume of the currently stored data;
First update module, for described in the row storage table, in the case of being, to update in judged result Row storage index.
8. device according to claim 7, it is characterised in that the determining unit also includes:
Detection module, for judge the corresponding line number of data volume of current the deleted data whether less than etc. After the corresponding line number of data volume of the currently stored data, in the case where judged result is no, inspection Survey accumulation data storage in the row storage table of the database the corresponding line number of data volume whether reach it is described The corresponding line number of data volume of current deleted data;
Second update module, for described in the row storage table, in the case of being, to update in testing result Row storage index.
9. device according to claim 6, it is characterised in that described device also includes:
First detector unit, for the data volume of current deleted data in the row storage table for obtaining database with In the row storage table of the database before the data volume of currently stored data, detect whether to there occurs for deleting Except the deletion action of the data in the row storage table,
Wherein, the acquiring unit is additionally operable in testing result, in the case of being, to perform the row for obtaining database Currently stored data in the current data volume of deleted data and the row storage table of the database in storage table The function of data volume.
10. device according to claim 9, it is characterised in that described device also includes:
Second detector unit, for detecting whether to there occurs for deleting deleting for the data in the row storage table After division operation, in the case where testing result is no, the row storage table of the database is further detected Whether the corresponding line number of data volume of middle accumulation data reaches default row group divides threshold value;
Updating block, for when testing result reaches the default row group and divides threshold value, updating the row storage Row storage index in table.
CN201510624998.7A 2015-09-25 2015-09-25 Update the method and device of column storage table Active CN106557494B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201510624998.7A CN106557494B (en) 2015-09-25 2015-09-25 Update the method and device of column storage table

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201510624998.7A CN106557494B (en) 2015-09-25 2015-09-25 Update the method and device of column storage table

Publications (2)

Publication Number Publication Date
CN106557494A true CN106557494A (en) 2017-04-05
CN106557494B CN106557494B (en) 2019-09-20

Family

ID=58415384

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201510624998.7A Active CN106557494B (en) 2015-09-25 2015-09-25 Update the method and device of column storage table

Country Status (1)

Country Link
CN (1) CN106557494B (en)

Cited By (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108875077A (en) * 2018-07-10 2018-11-23 上海达梦数据库有限公司 Column storage method, device, server and the storage medium of database
CN108959587A (en) * 2018-07-10 2018-12-07 上海达梦数据库有限公司 Data-updating method, device, server and storage medium based on column storage
CN108984719A (en) * 2018-07-10 2018-12-11 上海达梦数据库有限公司 Data-erasure method, device, server and storage medium based on column storage
CN110019191A (en) * 2017-09-21 2019-07-16 阿里巴巴集团控股有限公司 Database information processing method and processing device
CN110515963A (en) * 2019-08-30 2019-11-29 北京东软望海科技有限公司 Collect method, apparatus, electronic equipment and the readable storage medium storing program for executing of statistical information
CN110755063A (en) * 2018-10-06 2020-02-07 江苏创越医疗科技有限公司 Low-delay electrocardiogram drawing method
CN111291037A (en) * 2018-11-22 2020-06-16 中国移动通信集团重庆有限公司 Data storage and query method, device, equipment and computer storage medium
CN113901069A (en) * 2021-12-08 2022-01-07 威讯柏睿数据科技(北京)有限公司 Data storage method and device of distributed database
CN114398378A (en) * 2022-03-25 2022-04-26 北京奥星贝斯科技有限公司 Method and device for determining index cost

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101727465A (en) * 2008-11-03 2010-06-09 中国移动通信集团公司 Methods for establishing and inquiring index of distributed column storage database, device and system thereof
US20110219020A1 (en) * 2010-03-08 2011-09-08 Oks Artem A Columnar storage of a database index
CN102737132A (en) * 2012-06-25 2012-10-17 天津神舟通用数据技术有限公司 Multi-rule combined compression method based on database row and column mixed storage

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101727465A (en) * 2008-11-03 2010-06-09 中国移动通信集团公司 Methods for establishing and inquiring index of distributed column storage database, device and system thereof
US20110219020A1 (en) * 2010-03-08 2011-09-08 Oks Artem A Columnar storage of a database index
CN102737132A (en) * 2012-06-25 2012-10-17 天津神舟通用数据技术有限公司 Multi-rule combined compression method based on database row and column mixed storage

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
宋沄剑: "SQL Server 2014 可更新聚集列存储索引", 《HTTP://TECH.IT168.COM/A2014/0518/1624/000001624387_ALL.SHTML》 *

Cited By (12)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110019191A (en) * 2017-09-21 2019-07-16 阿里巴巴集团控股有限公司 Database information processing method and processing device
CN108875077A (en) * 2018-07-10 2018-11-23 上海达梦数据库有限公司 Column storage method, device, server and the storage medium of database
CN108959587A (en) * 2018-07-10 2018-12-07 上海达梦数据库有限公司 Data-updating method, device, server and storage medium based on column storage
CN108984719A (en) * 2018-07-10 2018-12-11 上海达梦数据库有限公司 Data-erasure method, device, server and storage medium based on column storage
CN108875077B (en) * 2018-07-10 2021-02-09 上海达梦数据库有限公司 Column storage method and device of database, server and storage medium
CN108959587B (en) * 2018-07-10 2021-03-02 上海达梦数据库有限公司 Data updating method and device based on column storage, server and storage medium
CN110755063A (en) * 2018-10-06 2020-02-07 江苏创越医疗科技有限公司 Low-delay electrocardiogram drawing method
CN110755063B (en) * 2018-10-06 2023-06-02 江苏创越医疗科技有限公司 Low-delay electrocardiogram drawing method
CN111291037A (en) * 2018-11-22 2020-06-16 中国移动通信集团重庆有限公司 Data storage and query method, device, equipment and computer storage medium
CN110515963A (en) * 2019-08-30 2019-11-29 北京东软望海科技有限公司 Collect method, apparatus, electronic equipment and the readable storage medium storing program for executing of statistical information
CN113901069A (en) * 2021-12-08 2022-01-07 威讯柏睿数据科技(北京)有限公司 Data storage method and device of distributed database
CN114398378A (en) * 2022-03-25 2022-04-26 北京奥星贝斯科技有限公司 Method and device for determining index cost

Also Published As

Publication number Publication date
CN106557494B (en) 2019-09-20

Similar Documents

Publication Publication Date Title
CN106557494A (en) Update the method and device of row storage table
CN103995855B (en) The method and apparatus of data storage
CN103793284B (en) Analysis system and method based on consensus pattern, for smart client service
CN109376196B (en) Method and device for batch synchronization of redo logs
CN110019891B (en) Image storage method, image retrieval method and device
CN111190962B (en) File synchronization method and device and local terminal
CN102929981B (en) Multimedia scanning file indexing means and device
CN107545021A (en) A kind of date storage method and device
CN108694188A (en) A kind of newer method of index data and relevant apparatus
CN106557499A (en) HBase secondary indexs creation method and device
CN102567522A (en) Method and device for managing file system of intelligent card
CN110188984A (en) A kind of tobacco rolls up the method for building up of anomalous mass data model between hired car
CN108154289A (en) A kind of product quality factor information automatic analysis system and automatic analysis method
CN105930178A (en) Configurable parameter dynamic loading method and system
CN111078790B (en) Method and system for synchronizing isolated block data in block chain and storage medium
CN109360605A (en) Gene order-checking data archiving method, server and computer readable storage medium
CN102298534A (en) Method for writing software into set-top box
CN102622367B (en) Method for filtering and compressing process data
CN108090095B (en) Method and device for reconstructing database in batches
CN110019168B (en) File merging method and system
CN106227661A (en) Data processing method and device
CN107341255B (en) Key value data processing method and device and electronic equipment
CN108776611A (en) A kind of cloud Host Administration method and device based on cloud management platform
CN116010479A (en) Processing method for slow query statement and related equipment
CN109489223A (en) Data processing method, device, equipment and air-conditioning

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
CB02 Change of applicant information
CB02 Change of applicant information

Address after: 100083 No. 401, 4th Floor, Haitai Building, 229 North Fourth Ring Road, Haidian District, Beijing

Applicant after: Beijing Guoshuang Technology Co.,Ltd.

Address before: 100086 Cuigong Hotel, 76 Zhichun Road, Shuangyushu District, Haidian District, Beijing

Applicant before: Beijing Guoshuang Technology Co.,Ltd.

GR01 Patent grant
GR01 Patent grant