The subject matter described herein relates a unified table metadata graph being represented both transiently and as persisted.
In-memory databases are database management systems in which data is primarily stored transiently; namely in main memory. In order to obtain optimum performance, as much data as possible must be kept in memory. However, with very large tables, it is not always possible to load the entire table into memory. Therefore, larger tables can be loaded into memory from persistence only partially, by loading and unloading parts of the table.
In one aspect, loading of table metadata into memory of an in-memory database is initiated. The table metadata is persisted across pages in a page chain. Thereafter, a plurality of metadata objects are materialized into memory that each include an object handle pinning an underlying persisted page in the page chain. The objects are populated with data from the underlying persisted pages. Subsequently, for one to many object relationships, a vector of object handles is generated that comprises a plurality of transient handles that each point to a different instance of a respective transient object. Alternatively, for one to one object relationships or many to one object relationships, an object handle to point to a respective linked object is generated.
The metadata objects can include table fragments, table metadata, dictionary objects, columns, column fragments, the page chain, and numerous other types of objects. Modifications to the table metadata can be performed solely in the page chain.
A first page in the page chain can include a table descriptor characterizing the metadata tree stored within the page chain. The metadata tree can be formed within the page chain using links which specify a portion of the associated page that corresponds to the object pointed to by one of the links or transient object handles. The table descriptor can form a root of a tree represented by links between objects, forming a linked chain sequentially linking each descriptor for 1:n relationships or storing a single link for 1:0 . . . 1 or n:1 relationships.
The table descriptor can form a linked chain sequentially linking each descriptor. Each page in the page chain can be linked. The in-memory database can be a column-oriented database that stores data tables as sections of columns. The table metadata can be used to generate a unified table.
Non-transitory computer program products (i.e., physically embodied computer program products) are also described that store instructions, which when executed by one or more data processors of one or more computing systems, causes at least one data processor to perform operations herein. Similarly, computer systems are also described that may include one or more data processors and memory coupled to the one or more data processors. The memory may temporarily or permanently store instructions that cause at least one processor to perform one or more of the operations described herein. In addition, methods can be implemented by one or more data processors either within a single computing system or distributed among two or more computing systems. Such computing systems can be connected and can exchange data and/or commands or other instructions or the like via one or more connections, including but not limited to a connection over a network (e.g. the Internet, a wireless wide area network, a local area network, a wide area network, a wired network, or the like), via a direct connection between one or more of the multiple computing systems, etc.
The subject matter described herein provides many technical advantages. For example, the current subject matter allows for objects to be efficiently represented both in a transient state (i.e., loaded into memory) and in a persistent state (i.e., stored to a physical storage).
The details of one or more variations of the subject matter described herein are set forth in the accompanying drawings and the description below. Other features and advantages of the subject matter described herein will be apparent from the description and drawings, and from the claims.
Like reference symbols in the various drawings indicate like elements.
The current subject matter includes a number of aspects that can be applied individually or in combinations of one or more such aspects to support a unified database table approach that integrates the performance advantages of in-memory database approaches with the reduced storage costs of on-disk database approaches. The current subject matter can be implemented in database systems using in-memory OLAP, for example including databases sized at several terabytes (or more), tables with billions (or more) of rows, and the like; systems using in-memory OLTP (e.g. enterprise resource planning or ERP system or the like, for example in databases sized at several terabytes (or more) with high transactional volumes; and systems using on-disk OLAP (e.g. “big data,” analytics servers for advanced analytics, data warehousing, business intelligence environments, or the like), for example databases sized at several petabytes or even more, tables with up to trillions of rows, and the like.
The current subject matter can be implemented as a core software platform of an enterprise resource planning (ERP) system, other business software architecture, or other data-intensive computing application or software architecture that runs on one or more processors that are under the control of a specific organization. This arrangement can be very effective for a large-scale organization that has very sophisticated in-house information technology (IT) staff and for whom a sizable capital investment in computing hardware and consulting services required to customize a commercially available business software solution to work with organization-specific business processes and functions is feasible.
A database management agent 160 or other comparable functionality can access a database management system 170 that stores and provides access to data (e.g. definitions of business scenarios, business processes, and one or more business configurations as well as data, metadata, master data, etc. relating to definitions of the business scenarios, business processes, and one or more business configurations, and/or concrete instances of data objects and/or business objects that are relevant to a specific instance of a business scenario or a business process, and the like. The database management system 170 can include at least one table 180 and additionally include parallelization features consistent with those described herein.
To achieve a best possible compression and also to support very large data tables, a main part of the table can be divided into one or more fragments.
Fragments 330 can advantageously be sufficiently large to gain maximum performance due to optimized compression of the fragment and high in-memory performance of aggregations and scans. Conversely, such fragments can be sufficiently small to load a largest column of any given fragment into memory and to sort the fragment in-memory. Fragments can also be sufficiently small to be able to coalesce two or more partially empty fragments into a smaller number of fragments. As an illustrative and non-limiting example of this aspect, a fragment can contain one billion rows with a maximum of 100 GB of data per column. Other fragment sizes are also within the scope of the current subject matter. A fragment can optionally include a chain of pages. In some implementations, a column can also include a chain of pages. Column data can be compressed, for example using a dictionary and/or any other compression method. Table fragments can be materialized in-memory in contiguous address spaces for maximum performance. All fragments of the database can be stored on-disk, and access to these fragments can be made based on an analysis of the data access requirement of a query.
Referring again to
Also as shown in
A single RowID space can be used across pages in a page chain. A RowID, which generally refers to a logical row in the database, can be used to refer to a logical row in an in-memory portion of the database and also to a physical row in an on-disk portion of the database. A row index typically refers to physical 0-based index of rows in the table. A 0-based index can be used to physically address rows in a contiguous array, where logical RowIDs represent logical order, not physical location of the rows. In some in-memory database systems, a physical identifier for a data record position can be referred to as a UDIV or DocID. Distinct from a logical RowID, the UDIV or DocID (or a comparable parameter) can indicate a physical position of a row (e.g. a data record), whereas the RowID indicates a logical position. To allow a partition of a table to have a single RowID and row index space consistent with implementations of the current subject matter, a RowID can be assigned a monotonically increasing ID for newly-inserted records and for new versions of updated records across fragments. In other words, updating a record will change its RowID, for example, because an update is effectively a deletion of an old record (having a RowID) and insertion of a new record (having a new RowID). Using this approach, a delta store of a table can be sorted by RowID, which can be used for optimizations of access paths. Separate physical table entities can be stored per partition, and these separate physical table entities can be joined on a query level into a logical table.
When an optimized compression is performed during a columnar merge operation to add changes recorded in the delta store to the main store, the rows in the table are generally re-sorted. In other words, the rows after a merge operation are typically no longer ordered by their physical row ID. Therefore, stable row identifier can be used consistent with one or more implementations of the current subject matter. The stable row identifiers can optionally be a logical RowID. Use of a stable, logical (as opposed to physical) RowID can allow rows to be addressed in REDO/UNDO entries in a write-ahead log and transaction undo log. Additionally, cursors that are stable across merges without holding references to the old main version of the database can be facilitated in this manner. To enable these features, a mapping of an in-memory logical RowID to a physical row index and vice versa can be stored. In some implementations of the current subject matter, a RowID column can be added to each table. The RowID column can also be amenable to being compressed in some implementations of the current subject matter.
A RowID index 506 can serve as a search structure to allow a page 504 to be found based on a given interval of RowID values. The search time can be on the order of log n, where n is very small. The RowID index can provide fast access to data via RowID values. For optimization, “new” pages can have a 1:1 association between RowID and row index, so that simple math (no lookup) operations are possible. Only pages that are reorganized by a merge process need a RowID index in at least some implementations of the current subject matter.
Functional block diagram 700 also illustrates a read operation 720. Generally, read operations can have access to all fragments (i.e., active fragment 712 and closed fragments 716). Read operations can be optimized by loading only the fragments that contain data from a particular query. Fragments that do not contain such data can be excluded. In order to make this decision, container-level metadata (e.g., a minimum value and/or a maximum value) can be stored for each fragment. This metadata can be compared to the query to determine whether a fragment contains the requested data.
With reference to diagram 800 of
It will be appreciated that with some variations, diagram 800 is a simplification as there can be many different objects at different levels of a hierarchy. On a first level, the fragments 830 can have a 1:n relation to column fragments. The table 810 can have a 1:n relation to column descriptors (that characterize the column fragments, etc.). The column fragments can have an n:1 relation to the column descriptors. Other objects relating to the dictionary for the delta and the main also can have a twin transient/persistent representation. All persistent metadata descriptors in the metadata graph have their respective transient object pointing to it via an object handle (and thus pinning them in memory).
One or more aspects or features of the subject matter described herein can be realized in digital electronic circuitry, integrated circuitry, specially designed application specific integrated circuits (ASICs), field programmable gate arrays (FPGAs) computer hardware, firmware, software, and/or combinations thereof. These various aspects or features can include implementation in one or more computer programs that are executable and/or interpretable on a programmable system including at least one programmable processor, which can be special or general purpose, coupled to receive data and instructions from, and to transmit data and instructions to, a storage system, at least one input device, and at least one output device. The programmable system or computing system may include clients and servers. A client and server are generally remote from each other and typically interact through a communication network. The relationship of client and server arises by virtue of computer programs running on the respective computers and having a client-server relationship to each other.
These computer programs, which can also be referred to as programs, software, software applications, applications, components, or code, include machine instructions for a programmable processor, and can be implemented in a high-level procedural language, an object-oriented programming language, a functional programming language, a logical programming language, and/or in assembly/machine language. As used herein, the term “machine-readable medium” refers to any computer program product, apparatus and/or device, such as for example magnetic discs, optical disks, memory, and Programmable Logic Devices (PLDs), used to provide machine instructions and/or data to a programmable processor, including a machine-readable medium that receives machine instructions as a machine-readable signal. The term “machine-readable signal” refers to any signal used to provide machine instructions and/or data to a programmable processor. The machine-readable medium can store such machine instructions non-transitorily, such as for example as would a non-transient solid-state memory or a magnetic hard drive or any equivalent storage medium. The machine-readable medium can alternatively or additionally store such machine instructions in a transient manner, such as for example as would a processor cache or other random access memory associated with one or more physical processor cores.
To provide for interaction with a user, one or more aspects or features of the subject matter described herein can be implemented on a computer having a display device, such as for example a cathode ray tube (CRT) or a liquid crystal display (LCD) or a light emitting diode (LED) monitor for displaying information to the user and a keyboard and a pointing device, such as for example a mouse or a trackball, by which the user may provide input to the computer. Other kinds of devices can be used to provide for interaction with a user as well. For example, feedback provided to the user can be any form of sensory feedback, such as for example visual feedback, auditory feedback, or tactile feedback; and input from the user may be received in any form, including, but not limited to, acoustic, speech, or tactile input. Other possible input devices include, but are not limited to, touch screens or other touch-sensitive devices such as single or multi-point resistive or capacitive trackpads, voice recognition hardware and software, optical scanners, optical pointers, digital image capture devices and associated interpretation software, and the like.
In the descriptions above and in the claims, phrases such as “at least one of” or “one or more of” may occur followed by a conjunctive list of elements or features. The term “and/or” may also occur in a list of two or more elements or features. Unless otherwise implicitly or explicitly contradicted by the context in which it is used, such a phrase is intended to mean any of the listed elements or features individually or any of the recited elements or features in combination with any of the other recited elements or features. For example, the phrases “at least one of A and B;” “one or more of A and B;” and “A and/or B” are each intended to mean “A alone, B alone, or A and B together.” A similar interpretation is also intended for lists including three or more items. For example, the phrases “at least one of A, B, and C;” “one or more of A, B, and C;” and “A, B, and/or C” are each intended to mean “A alone, B alone, C alone, A and B together, A and C together, B and C together, or A and B and C together.” In addition, use of the term “based on,” above and in the claims is intended to mean, “based at least in part on,” such that an unrecited feature or element is also permissible.
The subject matter described herein can be embodied in systems, apparatus, methods, and/or articles depending on the desired configuration. The implementations set forth in the foregoing description do not represent all implementations consistent with the subject matter described herein. Instead, they are merely some examples consistent with aspects related to the described subject matter. Although a few variations have been described in detail above, other modifications or additions are possible. In particular, further features and/or variations can be provided in addition to those set forth herein. For example, the implementations described above can be directed to various combinations and subcombinations of the disclosed features and/or combinations and subcombinations of several further features disclosed above. In addition, the logic flows depicted in the accompanying figures and/or described herein do not necessarily require the particular order shown, or sequential order, to achieve desirable results. Other implementations may be within the scope of the following claims.
Number | Name | Date | Kind |
---|---|---|---|
5222235 | Hintz et al. | Jun 1993 | A |
5594898 | Dalal et al. | Jan 1997 | A |
5701480 | Raz | Dec 1997 | A |
5717919 | Kodavalla et al. | Feb 1998 | A |
5758145 | Bhargava et al. | May 1998 | A |
5794229 | French et al. | Aug 1998 | A |
5870758 | Bamford et al. | Feb 1999 | A |
5933833 | Musashi | Aug 1999 | A |
6070165 | Whitmore | May 2000 | A |
6275830 | Muthukkaruppan | Aug 2001 | B1 |
6282605 | Moore | Aug 2001 | B1 |
6490670 | Collins et al. | Dec 2002 | B1 |
6567407 | Mizukoshi | May 2003 | B1 |
6606617 | Bonner et al. | Aug 2003 | B1 |
6668263 | Cranston et al. | Dec 2003 | B1 |
6754653 | Bonner et al. | Jun 2004 | B2 |
6865577 | Sereda | Mar 2005 | B1 |
7698712 | Schreter | Apr 2010 | B2 |
7761434 | Surtani et al. | Jul 2010 | B2 |
8024296 | Gopinathan et al. | Sep 2011 | B1 |
8161024 | Renkes et al. | Apr 2012 | B2 |
8224860 | Starkey | Jul 2012 | B2 |
8364648 | Sim-Tang | Jan 2013 | B1 |
8510344 | Briggs et al. | Aug 2013 | B1 |
8650583 | Schreter | Feb 2014 | B2 |
8732139 | Schreter | May 2014 | B2 |
8768891 | Schreter | Jul 2014 | B2 |
9058268 | Ostiguy et al. | Jun 2015 | B1 |
9098522 | Lee et al. | Aug 2015 | B2 |
9141435 | Wein | Sep 2015 | B2 |
9262330 | Muthukumarasamy | Feb 2016 | B2 |
9268810 | Andrei et al. | Feb 2016 | B2 |
9275095 | Bhattacharjee et al. | Mar 2016 | B2 |
9275097 | DeLaFranier et al. | Mar 2016 | B2 |
9305046 | Bhattacharjee et al. | Apr 2016 | B2 |
9372743 | Sethi et al. | Jun 2016 | B1 |
9430274 | Zhang | Aug 2016 | B2 |
9489409 | Sharique et al. | Nov 2016 | B2 |
9645844 | Zhang | May 2017 | B2 |
9665609 | Andrei et al. | May 2017 | B2 |
20010051944 | Lim et al. | Dec 2001 | A1 |
20020107837 | Osborne et al. | Aug 2002 | A1 |
20020156798 | Larue et al. | Oct 2002 | A1 |
20030028551 | Sutherland | Feb 2003 | A1 |
20030065652 | Spacey | Apr 2003 | A1 |
20030204534 | Hopeman et al. | Oct 2003 | A1 |
20030217075 | Nakano et al. | Nov 2003 | A1 |
20040034616 | Witkowski et al. | Feb 2004 | A1 |
20040054644 | Ganesh et al. | Mar 2004 | A1 |
20040064601 | Swanberg | Apr 2004 | A1 |
20040249838 | Hinshaw et al. | Dec 2004 | A1 |
20050027692 | Shyam et al. | Feb 2005 | A1 |
20050097266 | Factor et al. | May 2005 | A1 |
20050234868 | Terek et al. | Oct 2005 | A1 |
20060005191 | Boehm | Jan 2006 | A1 |
20060036655 | Lastovica | Feb 2006 | A1 |
20060206489 | Finnie et al. | Sep 2006 | A1 |
20080046444 | Fachan et al. | Feb 2008 | A1 |
20080183958 | Cheriton | Jul 2008 | A1 |
20080247729 | Park | Oct 2008 | A1 |
20090064160 | Larson et al. | Mar 2009 | A1 |
20090080523 | McDowell | Mar 2009 | A1 |
20090094236 | Renkes et al. | Apr 2009 | A1 |
20090254532 | Yang et al. | Oct 2009 | A1 |
20090287737 | Hammerly | Nov 2009 | A1 |
20100082545 | Bhattacharjee et al. | Apr 2010 | A1 |
20100088309 | Petculescu et al. | Apr 2010 | A1 |
20100241812 | Bekoou | Sep 2010 | A1 |
20100281005 | Carlin et al. | Nov 2010 | A1 |
20100287143 | Di Carlo et al. | Nov 2010 | A1 |
20110087854 | Rushworth et al. | Apr 2011 | A1 |
20110145835 | Rodrigues et al. | Jun 2011 | A1 |
20110153566 | Larson et al. | Jun 2011 | A1 |
20110252000 | Diaconu et al. | Oct 2011 | A1 |
20110270809 | Dinkar et al. | Nov 2011 | A1 |
20110276744 | Sengupta et al. | Nov 2011 | A1 |
20110302143 | Lomet | Dec 2011 | A1 |
20120011106 | Reid et al. | Jan 2012 | A1 |
20120047126 | Branscome et al. | Feb 2012 | A1 |
20120102006 | Larson et al. | Apr 2012 | A1 |
20120137081 | Shea | May 2012 | A1 |
20120179877 | Shriraman et al. | Jul 2012 | A1 |
20120191696 | Renkes et al. | Jul 2012 | A1 |
20120221528 | Renkes et al. | Aug 2012 | A1 |
20120233438 | Bak et al. | Sep 2012 | A1 |
20120265728 | Plattner et al. | Oct 2012 | A1 |
20120284228 | Ghosh et al. | Nov 2012 | A1 |
20130054936 | Davis | Feb 2013 | A1 |
20130091162 | Lewak | Apr 2013 | A1 |
20130097135 | Goldberg | Apr 2013 | A1 |
20130103655 | Fanghaenel et al. | Apr 2013 | A1 |
20130166566 | Lemke et al. | Jun 2013 | A1 |
20130346378 | Tsirogiannis et al. | Dec 2013 | A1 |
20140025651 | Schreter | Jan 2014 | A1 |
20140101093 | Lanphear et al. | Apr 2014 | A1 |
20140136571 | Bonvin et al. | May 2014 | A1 |
20140214334 | Plattner et al. | Jul 2014 | A1 |
20140279930 | Gupta et al. | Sep 2014 | A1 |
20140279961 | Schreter et al. | Sep 2014 | A1 |
20150039573 | Bhattacharjee et al. | Feb 2015 | A1 |
20150089125 | Mukherjee et al. | Mar 2015 | A1 |
20150113026 | Sharique et al. | Apr 2015 | A1 |
20150142819 | Florendo et al. | May 2015 | A1 |
20150193264 | Hutton et al. | Jul 2015 | A1 |
20150261805 | Lee et al. | Sep 2015 | A1 |
20150278281 | Zhang | Oct 2015 | A1 |
20160103860 | Bhattacharjee et al. | Apr 2016 | A1 |
20160125022 | Rider et al. | May 2016 | A1 |
20160147447 | Blanco et al. | May 2016 | A1 |
20160147448 | Schreter et al. | May 2016 | A1 |
20160147449 | Andrei et al. | May 2016 | A1 |
20160147457 | Legler et al. | May 2016 | A1 |
20160147459 | Wein et al. | May 2016 | A1 |
20160147617 | Lee et al. | May 2016 | A1 |
20160147618 | Lee et al. | May 2016 | A1 |
20160147750 | Blanco et al. | May 2016 | A1 |
20160147776 | Florendo et al. | May 2016 | A1 |
20160147778 | Schreter et al. | May 2016 | A1 |
20160147786 | Andrei et al. | May 2016 | A1 |
20160147801 | Wein et al. | May 2016 | A1 |
20160147804 | Wein et al. | May 2016 | A1 |
20160147806 | Blanco et al. | May 2016 | A1 |
20160147808 | Schreter et al. | May 2016 | A1 |
20160147809 | Schreter et al. | May 2016 | A1 |
20160147811 | Eluri et al. | May 2016 | A1 |
20160147812 | Andrei et al. | May 2016 | A1 |
20160147813 | Lee et al. | May 2016 | A1 |
20160147814 | Goel et al. | May 2016 | A1 |
20160147819 | Schreter et al. | May 2016 | A1 |
20160147820 | Schreter | May 2016 | A1 |
20160147821 | Schreter et al. | May 2016 | A1 |
20160147834 | Lee et al. | May 2016 | A1 |
20160147858 | Lee et al. | May 2016 | A1 |
20160147859 | Lee et al. | May 2016 | A1 |
20160147861 | Schreter et al. | May 2016 | A1 |
20160147862 | Schreter et al. | May 2016 | A1 |
20160147904 | Wein et al. | May 2016 | A1 |
20160147906 | Schreter et al. | May 2016 | A1 |
Number | Date | Country |
---|---|---|
2778961 | Sep 2014 | EP |
WO-0129690 | Apr 2001 | WO |
Entry |
---|
“HANA database lectures—Outline Part 1 Motivation—Why main memory processing.” Mar. 2014 (Mar. 2014). XP055197666. Web. Jun. 23, 2015. 81 pages. URL: http://cse.yeditepe.edu.tr/-odemir/spring2014/cse415/HanaDatabase.pdf. |
“HANA Persistence: Shadow Pages.” Jun. 2013. Yeditepe Üniversitesi Bilgisayar Mühendisli{hacek over (g)}i Bölümü. Web. Apr. 21, 2016. 32 pages. <http://cse.yeditepe.edu.tr/˜odemir/spring2014/cse415/Persistency.pptx>. |
“Optimistic concurrency control.” Wikipedia: The Free Encyclopedia. Wikimedia Foundation, Inc., Jul. 19, 2014. Web. Mar. 3, 2016. pp. 1-3. |
Brown, E. et al. “Fast Incremental Indexing for Full-Text Information Retrieval.” VLDB '94 Proceedings of the 20th International Conference on Very Large Data Bases. San Francisco: Morgan Kaufmann, 1994. pp. 1-11. |
Jens Krueger et al. “Main Memory Databases for Enterprise Applications.” Industrial Engineering and Engineering Management (IE&EM), 2011 IEEE 18th International Conference on, IEEE, Sep. 3, 2011 (Sep. 3, 2011), pp. 547-557, XP032056073. |
Lemke, Christian, et al, “Speeding Up Queries in Column Stores.” Data Warehousing and Knowledge Discovery Lecture Notes in Computer Science (2010): 117-29. Web. Apr. 21, 2016. |
Lu, Andy. “SAP HANA Concurrency Control.” SAP Community Network. Oct. 28, 2014. Web. Apr. 22, 2016. 4 pages. <http://scn.sap.com/docs/DOC-57101>. |
Mumy, Mark. “SAP Sybase IQ 16.0 Hardware Sizing Guide.” SAP Community Network. May 12, 2013. Web. Apr. 21, 2016. 25 pages. <http://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/c0836b4f-429d-3010-a686-c35c73674180?QuickLink=index&overridelayout=true&58385785468058>. |
“NBit Dictionary Compression,” Sybase, May 23, 2013. Web. Mar. 15, 2017 <http://infocenter.sybase.com/help/index.jsp?topic=/com.sybase.infocenter.dc1777.1600/doc/html/wil1345808527844.html>. |
Ailamaki, et al., “Weaving Relations for Cache Performance,” Proceedings of the the Twenty-Seventh International Conference on Very Large Data Bases, Sep. 11-14, Orlando, FL, Jan. 1, 2001. |
Hector Garcia-Molina, et al., “Database Systems The Second Complete Book Second Edition—Chapter 13—Secondary Storage Management,” Database Systems the Complete Book, second edition, Jun. 15, 2008. |
Number | Date | Country | |
---|---|---|---|
20160147445 A1 | May 2016 | US |