You are on page 1of 11
2) United States Patent Hanson et al. (54) SYSTEM AND METHOD FOR ON-DEMAND INDEXING (75) Inveators:- Mark E. Hanson, Los Angeles, CA (US); Richard Endo, Los Angoe Anges CA (US): Hagin Hendeks, Los Angeles, CA (US); David Brookler, Los Angeles, CA (US) (73) Assignee: SAP.AG, Walldort DE) (*) Notice: Subject to any disclaimer, the term of this pateat is extended of adjusted under 35 USC. 1540) by 329 days. (21) Appl. Nos 12494120 (22) Filed: Jun, 29, 2000 6s) Prior Publication Data US 201010332501. AI Dee. 30, 2010 (1) Ince Gos 700 Gor 1700 Gos 1730 GOOF 15/16 (52) U (2005.01) (2006.01), (2005.01), (2006.01) TOTITAL; 7071696 'US008200673B2 (10) Patent No. 4s) Date of Patent: US 8,200,673 B2 Jun, 12, 2012 (58) Fleld of Classification Search qo7T741, ‘T0T/698 See aplication file for complet search history 60) References Cited US. PATENT DOCUMENTS 5504804 A+ 411996 Fergsonet a wor 68.976 BL 42008 Brooker eal Ssiea0 B2* U2011 Aynouye eal sons 2020120617 AL* aonsoonsore Al anos024i7ss AL* 10 008 Reais Snnmoopsise AL* 42009 Kan * cited by examiner 2002. Yosiyamn ea 22003, Abeta Greta Robinson, Brian E, Weinrich Buckley, Masehof & Primary Examiner Assistant Examiner (74) Attorney, Agent Tawalkar LLC on ABSTRACT A system and method for on-demand indexing in a data ‘agement system is described. An index s peneated when itis requested, such as when a database operation requires ‘acess tothe index. Ihe index is loads in memory, the index js retrieved from memony, Otherwise the index is generated ‘on-demand, A priority configuration identifies atleast one priory index which is generated and loaded in memory. The Friorty configuration can identify priority indexes either {relly or indirely, such as by a threshold parameter or Firm laims, § Drawing Sheets U.S, Patent Jun. 12,2012 Sheet 1 of 5 ‘Communication Infrastructure (Bus) 402 Ky Processor 407 J Main Memory 198. Display interface US 8,200,673 B2 Secondary Memory 112 Hard Disk Drive iia Removable Removable Lele! storage Storage Drive Unit 48 Removable Interface Letm| Storage 120 Unit 422 Ky ‘Communication Interface ded. Ky Human inierace Devices. 130 Communication Path F IGURE 1 U.S. Patent Jun, 12, 2012 Sheet 2 of 5 US 8,200,673 B2 Data Manager 200 & +. > [On-demand indexing module FIGURE 2 U.S. Patent Jun, 12, 2012 Sheet 3 of 5 US 8,200,673 B2 (or? FIGURE 3 Generate priority indexes 306 —Get next threshold parameter} vs 316 STOP U.S. Patent Jun, 12, 2012 Sheet 4 of 5 US 8,200,673 B2 FIGURE 4 a 08 | J LN 414 ilee — ee | 418 U.S. Patent Jun, 12, 2012 Sheet 5 of 5 US 8,200,673 B2 FIGURE 5 Create A index US 8,200,673 B2 1 SYSTEM AND METHOD FOR ON-DEMAND INDEXING, BACKGROUND OF THE INVENTION 1. Field ofthe Invention Embodiments of the invention described herein pertain to the field of computer systems. More particulary, but not by ‘way of imitation, one or more embodiments ofthe invention relate to on-demand indexing in a data mangement system. 2. Description ofthe Related Art ‘Master data systems simplify maintenance and promote ‘data integrity by simplifying the user's view ofthedataand its repository. For example, SAP's Master Data Management Environment (MDME) system is an integrated system for ‘master data management that uses a SQL (Structured Query Language) DBMS, but does nt require designers to use SQL or searching sorting, and retrieving of information. A stan- dard SQL DBMS does not support the types of advanced Sinvctures necessary for managing databases of master data Generally speaking master data systems consist of a thick shell of functionality on top of a $QL-hased DBMS to pro- vide sealable database where datas flly secessiblevo other SQL -basod applications and tools. “A database index can improve the speed of database opera tions on a lable, such as record access and search, Database indexes can be use inerease the eficieney of a master data system. Database systems require many indexes in order to clfciently search, but often many of the indexes which ate calculated and loaded into memory are not utilized. Database Indexes typically require less disk space than the indexed data, but become larger asthe amber of record is inereased Funhermore, as the numberof records is increased, building indexes becomes computationally intensiveand thus, thesys- tem is slosed down during load time. “There are curently 20 Known systems that provide on ‘demand indexing that initially loads subset of indexes and ‘calculates other indexes when a tsk is initiated that requires those indexes. For a leas the litations described above there is «need {ora system that initially loads a subset of indexes and cal- ‘ulates ober indexes whea a task i initiated that requires those indexes. BRIEP SUMMARY OF THE INVENTION ‘Oneormore embodiments ofthe iavention enable asystem ‘and method for on-demand indexing ina data management system. Various aspects of the invention are based on the insight that many of the indexes which are calculated and loaded into memory are not utilized, ‘One oF more embodiments of the invention are directed ‘owant a system and method of on-demand generation of un index. In on-demand generation, an index is generated when itis requested, such as when a database operation requires access tothe index. request for an index is received. Ifthe index is loaded in memory, the index is retrieved trom memory. Otherwise, the index is generated on-demand. One ‘oF more embodiments ofthe invention ae dreeted toward 3 ‘method that selectively generates and loads some indexes and enerates other indexes on-demand ‘One or more embodiments of the invention wilize a prior- ‘ty configuration identifying atleast one priority index whieh js generated and loaded in memory. The priority configura- tion identifies priority indexes either directly or indirectly, suchas by threshold parameters. Anindex that moetsathresh- ‘old indicated by a least oe threshold parameter is generated 0 o 2 and loaded in memory. One or more embodiments of the invention utilize threshold parameters indicating a frequency of index usage. One or more embodiments of the invention are directed ‘toward a system and method of maintaining priority indexes stored in memory. Changes to database records related to a Priory index are stored in an associated index. An uplated priority index is calculated using the & index when the prior ity index is roquested, BRIEF DESCRIPTION OP THE DRAWINGS. Theabove another aspects, features and advantages ofthe invention will he more appareat from the Tollowing more particular desertion thereof, presented in eoujunetion with the following drawings wherein: FIG. {illustrates an exemplary computersystem on whieh the system and method ofthe invention may be practiced, FIG, 2 isa block diagram ofa data management system sccording to one embodiment ofthe invention, FIG. 3 provides diagram of process steps to load priority indexes to memory one or more embodiments ofthe inven- ‘io, TFG. 4 provides a diagram of process steps to generate indexes on demand in one or moreembodiiments ofthe iaven- FIG. 5 provides a diggram of process steps to. maintain priority indexes in one or more embodiments the inveation. DETAILED DESCRIPTION A method and system for on-demand indexing will now be scribed. Inthe following exemplary description numerous specific details are set forth in order to provide a more thor- ‘ough understanding of embodiments ofthe inventoa,1¢ wil be apparent, however, to an artisan of ordinary skill that the present invention may be practiced without incorporating sll aspects of the specific details described herein, In other instances, specific features or functions wellknown to those ofordinary skill nthe art have not been described deal $0 fas not to obscure the invention. Readers should note that although examples ofthe invention ate set forth herein, the ‘claims, and the fill scope of any equivalents, are what define ‘the metes and bounds of the invention. FIG. 1 is provided for purposes of illustrating a general- purpose computer and peripherals which, when programmed as described herein, may operate as a specially programmed ‘computer capable of implementing one or more methods, apparatus and/or systems ofthe invention, Processor 107 may be conpled to a bi-directional commnnication infrasteuctare such as Communication Infrastructure System Bus 102. ‘Communication Infrastructure 102 may generally bea sys- ‘tem hus that provides an interface to the olher components ia the gonorl-purpose computer system such as Processor 107, Main Memory 106, Display Interface 108, Secondary ‘Memory 112 and/or Communication Interface 124 ‘Main memory 106 may provide a computer readable medium for aceessing and executed stored data and applica- ‘ions. Display Interface 108 may communicate with Display Unit 10 that may be wilizedo display outputs othe user of | the specially-programmed computer system. Display Unit 10 may comprise one or more monitors that may visually depict aspects of the computer program to the user. Main ‘Memory 106 and Display Interface 108 may be coupled to Comminiation Inrastnictire 102, which may serve as the interlace point to Sesondary Memory 112 and Commuinica- tion Interface 124, Secondary Memory 112 may provide US 8,200,673 B2 3 additional memory resources beyond main Memory 106, and ‘may generally Function aa storage location for computer programs 10 be executed by Processor 107, Bither fixed or Femovable computer readable media may serve as Secondary Memory 112, Secondary Memory 112 may comprise, for ‘example, lard Disk 114 and Removable Storage Drive 116 that may have an associated Removable Storage Unit 118 “There may be multiple sources of Secondary Memory 112, and systems of the invention may be configured 3s needed t0 support the data storage requirements of the user and the methods described herein, Secondary Memory 112 may also ‘comprise Interface 120 that serves as an interface point 10 ‘ditional storage such as Removable Storage Unit 122, Numerous types of data storage devices may serve as eposi tories for data utilized by the specially programmed comp system of the invention. For example, magnetic, optical or ‘magnetic-opical storage systems, orany other available mass storage technology that provides arepository fordgital infor mation may be used. ‘Communication Interface 124 may be coupled © Commu- nication Infrastructure 102 and may serve as a conduit for daa destined for or received from Communication Pa 126, ‘A Network Interface Card (NIC) is an example of the typeof ‘device that once coupled to Communication Infrastructure 102 may provide a mechanism for tansportig data Com ‘munication Path 126. Computer networks such Local Area Newworks (LAN), Wide Area Networks (WAN), Wireless networks, optical networks, distbuted networks, the Internet ‘or any combination thereof are some examples of the type of ‘communication paths that may be uiized by the specially program computer system of the invention, Communication Path 126 may comprise any type of telecommunication net- ‘work or interconnection fabric that ean transport data to and from Communication Interface 124 To facilitate user interaction with the specially pro- rammed computer system of the iavention, one oF more Human Interface Devices (HID) 130 may be provided. Some ‘examples of HIDs that enable users to input commands oF data to the specially programmed computer af the invention may comprise a keyboard, mouse, touch sereen devices, microphones or other andi interface devices, mation sensors ‘or the lke, aswell as anyother device able to accept any kind ‘of man inpat and in tum communicate that input to Pro- ‘cessor 107 rigger oncor more responses from thespecally| Programmed computer of the ivention are within the seope ‘of te system of the invention. While FIG. 1 depicts a physical device, the seope of the system of the invention may also encompass a viual deviee, Viral machine or simulator embodied in one or more eon. ter programs executing on 8 computer or computer system nd acting or providing a computer system environment com- paiible with the methods and processes of the invention. ‘Where a viral machine, proces, device or othervise per Forms substantially similary to that of physical eomprter system of the invention, such a viral platform will also fall ‘within hescopeofa system ofthe invention, notwithstanding, the description hervinofa physical system suchas that in FIG. 1 ‘One o more embodiments ofthe vention ae configured tw enable the specially programmed computer of the inven- tion o take the input data given and transform itintoa source- independent server interface by applying one or more ofthe methods and/or processes of the invention as described herein. Thus the methods deseribed herein are able to trans- orm the raw input data, such as digital commands, to @ source-independent server interface accepting origin-specific ‘commands, using the system of the invention to result in a 4 the server perfoming orign-specifie commands arranged to preserve the independence of the, using the specially pro- grammed computers described herein, Particularly the sy3- fem of the invention may be programmed to acquire an object containing commancls for execution and interpreting said ‘commands in light of an origin-independent interface FIG. 2 isa block diagram ofa data management system configured in noeordance with one or more embodiments of the jiwention. Data manager 200 stores, maintains. and handles requests to access dats records, In oe or more embodiment ofthe invention, data manager 200 ineludes the unctionality of wadiional database management system (DBMS), such asa relational database management system (RDBMS). Data manager 200 may be implemented on one server system. In another embodiment ofthe invention, com poneats of Data manager 200 are implemented over multiple ‘computer systems. ‘Data mansger 200 includes data store 204 and index store 202. Data stove 204 and index store 202 may reside on the Same or different memory deviees, such as magnetic, optical ‘oF magnetic-optical stonge systems, or any other available ‘mss storage technology that provides a repository for digital information, Data store 204 serves a8 repository of data records managed by data manager200. Index store 202 serves asa repository of priority indexes used by data manager 200. Priority indexes are generated and loaded in memory, while other indexes are only’ generated on-demand when a task is inikated that requires those indexes, As used herein, the term “priority index” refers to any index identified in @ priority configuration used to determine which indexes to generate and load. For example. a privity index may be dircely speci- fied inthe priority configuration, or may be identified using a threshold parameter in the priority configuration, As used Doerein, the tem “threshold priority index” refers to an index ‘identified using threshold parameter in a prorty contig ‘ation, Data about an index, such as the frequency of aces js analyzed and compared to threshold parameter to deter ‘mine ifthe index isa threshold priority index. As used herein, the term “index” refers toany data stricture usable to improve the speed of operations ina database table, In one or more ‘embodiments of the invention, indexes include bit vectors as ‘eseribed in U.S. Pat. No. 679,975, which s hereby incor porated herein by reference in its entirety. Other types of indexes compatible with the one or more embodiments ofthe invention include, but are not limited to, sor indexes, key- ‘word indexes, substring indexes and inheritance indexes, ‘Data manager 200alsoinchdes on-demand indexing mod ‘ule 206, On-demand indexing module 206 manages indexes inindex store 202, including generation, deletion, update, and any other modification of an index. Onedemand indexing ‘module 206 also provides roquested indexes in response o roguest for an index, such as a request generate by data ‘management module 208, On-demand indexing module 206 ‘ay be implemented on the same or different computer sy temas index store 202 and data store 204, On-clemand index- ‘ng module 206 communicates with configuration client 260 In acconlance with one oe more embadiments of the iven- ‘ion, on-demand indexing, module 206 receives 2 pririty configuration from configuration client 260. The priority eon- figuration contains information used by on-demand indexing dle 206 to determine priority indexes. Priority indexes fare be generated and loaded to index store 202, while other indexes will be generated on-demand. In one or more tembodimients of the invention, index store 202 resides in RAM, allowing fast aecess to priority indexes. Communiea- tions involving on-demand indexing module may take place ‘over network 260, Network 260 may bea local area network, US 8,200,673 B2 5 Wide area network, wireless network, or any other network. Altematively, communications may occur over a comtni= ‘ation infrastructure 102, ‘Data manager 200 also inches data management module 208, Dain management mode 208 manages data in data store 204, inluding generation, deletion, update, and any ‘ther moalfcation oF any recordin data store 204. Data man- ‘agement module 208 also provides requested data in response to a query. Data management module 208 may be imple- sented the same or diflerent computer system as index store 202, data store 204 and on-demand indexing module 206. Data management module 208 may include or substantially perform the Functions provided by a standard database man- ‘agement sysiem (DBMS). Data management module 208, ‘communiates with data clients 261-263. Data clients 261- 263 include any rogram configured to request data managed by dats manager 200. In particular, data clients 261-263 request data stored data store 204 by sending aquery to data management modole 208. Data clients 261-263 may also send data mangement module 208 request o creat, delete tupdate or otherwise modify data in data store 204, Data ‘management module 208 also communicates with on-de- ‘mand indexing module 206, ln particular, when data manage- ‘ment module 208 need o aeces an index in onder to respond to queries from data liens 261-263, it sends request forthe involving data management module 208 may take place over network 250, Network 250 may bea local area network, Wide ares network, wireless network, orany other network. A data ‘’licat may also reside on the same computer system as data ‘manager 200, snd communication may decur over a comm- nication infrastructure 102 IG. 3 provides disgram of process steps to load piorty indexes in accordance with one or more embodiment ofthe jventio, The process begins at stop 300, Procesting contin- esto step 302, where a priority configurationis weeived. The Priority configuration indicates which indexes to generate ‘and Toad into memory, The prioity configuration may’ indi fete an index diretly (priarty indexes) or by a threshold parameter (threshold priority indexes), Possible threshold parameters include frequency of index wsage, sizeof index, esourees avaiable on the system, or any other statistic oF mictadata related tothe indexes, the data or the system, The priority configuration may be received as input from a user Such as ina userdefined fle, though a graphical user inter Jace (GUD, or through any other means of input by user, In ‘one or more embodiments ofthe invention, the prorty con figuration is generated by another computerized process, such asa process that analyzes the system, the data, or metae data Processing continues to stop 304, where the directly indi- ‘cated indexes, or priority indexes are generated, In one oF ‘more embodiments ofthe invention, no priority indexes are indicated inthe priority configuration. Inthisease, no privity indexes are generated at step 304. Processing continues to step 306, where a determination is made whether threshold parameters were present inthe pi- ‘rity configuration. Ine thresbold parameters are included, processing continues to step 316 and terminates. Otherwise, processing Continues to step 308, where a threshold parameter i selected. Processing Continues to step 5310, where a determination is made whether an index mests the treshotd defined by the threshold parameter. A threshold parameter may identify a parameter and a single index (eg. Index-X, Paramsize'V indicates that index X should be generated ifthe sizeof the inde is greater than Y), Alterna lively, a threshold parameter may be applied to multiple 0 o 6 indexes (¢.IndexALL, Param-daytreg 100 indicates that ‘any index should be generated that s accessed more than 100 times a day), In one or more embodiments ofthe invention, the priority configuration includes multiple threshold param fers that are applied tothe same index to determine whether the index is a threshold priority index ‘han index meets the threshold defined by the threshold parameter, the index is considered a threshald priority index And is generated. Processing continues to step 314, where a Seermination is made whether there are more thresbold parameters to process, If more threshold parameters exist, Processing conlinues to sep 308, Otherwise, processing con. ‘inves o step 316 and terminates, Kt would be apparent to an ‘nis of orinary skill that one or more embodiments ofthe invention may be practiced where a process continues 10 ‘monitor an index associated witha threshold parameter, reat. ing the index as threshold priority index ifthe thresbokd becomes satisfied. One example of such an embodiment of the invention is described in FIG. 4 FIG. 4 provides a diagram of process steps to generate ‘indexes on demand in one or more embodiments ofthe inven- tion. In on-demand generation, an index is generated in response toa ees to access the index when the index snot Todd in memory, ie the index is nota priority index. The process begins at sep 400. Processing contints to step 402, where @ request Lo access an index is received. Processing continues to step 404, where a determination is made whether the index isa priority index. Ide index is. peority index, processing continues ta step 412, Otherwise, processing con” ‘inves wo stop 406, Atstep 406, the index is generated. At optional step 408, 2 determination is made whether a threshold defined by’ @ threshold parameter has Boen met forthe index. This deter mination may be made eal time the index is requested, oF at any other frequency. The priority configuration may spociy a ‘requency for checking whether a threshold has been met. IF ro threshold has been met, processing continues directly t0 step 418, fa threshold has been met, processing continues to step 410 sere the index is identified as 9 port index and sored and maintained with the priority indexes, Processing continues to step 418, ‘Returning step 412, the index is accessed from memory. Processing continues to step 414, where a detemnination is made whethera A index is associated with the priority index. ha A index is present, processing continues to step 416, ‘where the index: merged with te procty index, updating the prionly index to ereate a current version of the priority index tht reflects the changes recorded in the A index. Pro- cessing continues to step 418, Ifno threshold has been met processing continues dreely to step 418, Atstep 418, the index is provided in response tothe request to access the index. Processing continues to step 420 and TFIG. § provides a diggram of process steps to maintain priority indexes inaccordance with one or more embodiments ff the invention. The process begins at step $00, Processing continues o step 02, where a notification ofa record change js received. Processing eontinves to step 504, where a deter snination is made whether a stored priority index is affected Inanother embodiment ofthe invention, notifications are only received when record hinges allet stored priority indexes. If stored priority index is fected, processing contnies to step 506, Orherwise, processing coitinues t0 step $16 and ‘Returning to step $06, determination ismade whether a A index is associated with the affected priority index. Ia & index is associated with the affected priority index, process: US 8,200,673 B2 1 Jing continues a step $10, Otherwise, processing continues to sep 508, where a index is ereated. Prooessing continues 10 step S10. Atstep $10, an entry is added to the index to keep track ‘of the record elange. Fairies in the A index may simply ‘dentfy changed records. In this case, the changed records must be accessed to update the stored priority index when & ‘current version ofthe priority index required. Altematively, the A index may contain enough data to update a stored priority index without accessing the changed records Processing cominues to step 12, where determination is made whether 0 update the priority index in memory. This ‘determination may be made after each record change. or at ‘another specified frequeney. The priority configuration may specify a frequency, if at all, for updating an index after 2 recoed change affecting the index. Ii is determined thatthe index should be updated, processing continues to stop S14, where the priority index is menzed with the A index and the stored priority index 516 and terminates, ‘Whilethe invention herein disclosed has been described by means of specific embodiments aad applications thereof, ‘numerous modifications and variations could be made thereto by those skilled in the ant without departing fom the scope of the invention so forth inthe claims. 1. A method of on-demand generation of an index of recon ina data management system comprising: ‘ceiving a priory configuration including information ‘dentilying at least one priority index associated with records in sid data management syste: szenerating seid at leat one priority index prior o receiving ‘any request forthe priority index, and loading said at least one priority index in said memory; receiving a request fra fist index:

You might also like