tpcc_current (1034761), страница 3
Текст из файла (страница 3)
Absolu te certainty or certainty beyond a reasonabled ou bt is not requ ired to m ake a ju d gm ent on this com p lex issu e. The qu estion that m u st be answ ered is this: basedon the available evid ence, d oes the clear p rep ond erance (the greater share or w eight) of evid e nce ind icate that thisim p lem entation is a benchm ark sp ecial?The follow ing characteristics shou ld be u sed to ju d ge w hether a p articu lar im p lem entation is a benchm ark sp ecial:• Is the im p lem entation generally available, d ocu m ented , and su p p orted ?• Does the im p lem entation have significant restrictions on its u se or ap p licability that lim its its u se beyond TPCbenchm arks?• Is the im p lem entation or p art of the im p lem entation p oorly integrated into the larger p rod u ct?• Does the im p lem entation take sp ecial a d vantage of the lim ited natu re of TPC benchm arks (e.g., transactionp rofile, transaction m ix, transaction concu rrency and / or contention, transaction isolation) in a m anner thatw ou ld not be generally ap p licable to the en vironm ent the benchm ark rep resents?TPC Benchm ark™C - Stand ard Sp ecification, Revision 5.11 - Page 8 of 130• Is the u se of the im p lem entation d iscou raged by the vend or? (This inclu d es failing to p rom ote theim p lem entation in a m anner sim ilar to other p rod u cts and technologies.)• Does the im p lem entation requ ire u ncom m on sop h istication on the p art of the end -u ser, p rogram m er, orsystem ad m inistrator?•Is the p ricing u nu su al or non -cu stom ary for the vend or or u nu su al or non -cu stom ary to norm al bu sinessp ractices? See the cu rrent revision of the TPC Pricing Sp ecification for a d d itional inform ation.• Is the im p lem entation being u sed (inclu d ing beta) or p u rchased by end -u sers in the m arket area thebenchm ark rep resents? H ow m any? Mu ltip le sites? If the im p lem entation is not cu rrently being u sed byend -u sers, is there any evid ence to ind icate that it w ill be u sed by a significant nu m ber of u sers?0.3 General Measurement GuidelinesTPC benchm ark resu lts are exp ected to be accu rate rep resentations of system p erform ance.
Therefore, there arecertain gu id elines w hich are exp ected to be follow ed w hen m easu ring those resu lts. The ap p roach or m ethod ology isexp licitly ou tlined in or d escribed in the sp ecification.• The ap p roach is an accep ted is an accep ted engineering p ractice or stand ard .• The ap p roach d oes not enhance the resu lt.• Equ ip m ent u sed in m easu ring resu lts is calibrated accord ing to established qu ality stand ard s.• Fid elity and cand or is m aintained in rep orting any anom alies in the resu lts, even if not sp ecified in thebenchm ark requ irem ents.The u se of new m ethod ologies and ap p roaches is encou raged so long as they m eet the requ irem ents above.TPC Benchm ark™C - Stand ard Sp ecification, Revision 5.11 - Page 9 of 130Clause 1: LOGICAL D ATABASE D ESIGN1.1Business and Application EnvironmentTPC Benchm ark™C is com p rised of a set of basic op erations d esigned to exercise system fu nctionalities in a m annerrep resentative of com p lex OLTP ap p lication environm ents.
These basic op erations have been given a life -likecontext, p ortraying the activity of a w holesale su p p lier, to help u sers relate intu itively to the com p onents of thebenchm ark. The w orkload is centered on the activity of p rocessing ord ers and p rovid es a logical d atabase d esign,w hich can be d istribu ted w ithou t stru ctu ral changes to transactions.TPC-C d oes not rep resent the activity of any p articu lar bu siness segm ent, bu t rather any ind u stry w hich m u stm anage, sell, or d istribu te a p rod u ct or service (e.g., car rental, food d istribu tion, p arts su p p lie r, etc.).
TPC-C d oesnot attem p t to be a m od el of how to bu ild an actu al ap p lication .The p u rp ose of a benchm ark is to red u ce the d iversity of op erations fou nd in a p rod u ction ap p lication , w hileretaining the ap p lication's essential p erform ance characteristics, nam ely: the level of system u tilization and thecom p lexity of op erations. A large nu m ber of fu nctions have to be p erform ed to m anage a p rod u ction ord er entrysystem . Many of these fu nctions are not of p rim ary interest for p erform ance analysis, since they are p rop ortionallysm all in term s of system resou rce u tilization or in term s of frequ ency of execu tion. Althou gh these fu nctions are vitalfor a p rod u ction system , they m erely create excessive d iversity in the context of a stand ard benchm ark and havebeen om itted in TPC-C.The Com p any p ortrayed by the benchm ark is a w holesale su p p lier w ith a num ber of geograp hically d istribu tedsales d istricts and associated w arehou ses.
As the Com p any's bu siness e xp and s, new w arehou ses and associatedsales d istricts are created . Each regional w arehou se covers 10 d istricts. Each d istrict serves 3,000 cu stom ers. Allw arehou ses m aintain stocks for the 100,000 item s sold by the Com p any. The follow ing d iagram illu strat es thew arehou se, d istrict, and cu stom er hierarchy of TPC-C's bu siness environm ent.Compa nyWa re hou se-1Dis tri ct-112Wa re hou se-WDis tri ct-23kDis tri ct-1 030 kCustome rsTPC Benchm ark™C - Stand ard Sp ecification, Revision 5.11 - Page 10 of 130Cu stom ers call the Com p any to p lace a new ord er or requ est the statu s of an existing ord er.
Ord ers are com p osed ofan average of 10 ord er lines (i.e., line item s). One p ercent of all ord er lines are for item s not in -stock at the regionalw arehou se and m u st be su p p lied by another w arehou se.The Com p any's system is also u sed to enter p aym ents from cu stom ers, p rocess ord ers for d elivery, and exam inestock levels to id entify p otential su p p ly shortages.1.2D atabase Entities, Relationships, and Characteristics1.2.1The com p onents of the TPC-C d atabase are d efined to consist of nine sep arate and ind ivid u a l tables.The relationship s am ong these tables are d efined in the entity -relationship d iagram show n below and are su bject tothe ru les sp ecified in Clau se 1.4.10Wa re hou seWHis to ryW*3 0k+10 0kS to ckW*1 00kWIte m10 0k3+New-OrderW*9 k+Ord er-L in eW*3 00k+Dis tri ctW*1 03k1+Custome rW*3 0k0-15-151+Ord erW*3 0k+Legend:• All nu m bers show n illu strate the d atabase p op u lation requ irem ents (see Clau se 4.3).• The nu m bers in the entity blocks rep resent the card inality of the tables (nu m ber of row s).
These nu m bers arefactored by W, the nu m ber of Warehou ses, to illu strate the d atabase scaling. (see Clau se 4).• The nu m bers next to the relationship arrow s rep resent the card inality of the relationship s (average nu m ber ofchild ren p er p arent).• The p lu s (+) sym bol is u sed after the card inality of a relationship or table to illu strate that this nu m ber issu bject to sm all variations in the initial d atabase p op u lation over the m easu rem ent interval (see Clau se 5.5) asrow s are ad d ed or d eleted .1.3Table Layouts1.3.1The follow ing list d efines the m inim al stru ctu re (list of attribu tes) of each table w here:• N unique ID s m eans that the attribu te m u st be able to hold any one ID w ithin a m inim u m set of N u niqu eIDs, regard less of the p hysical rep resentation (e.g., binary, p acked d ecim al, alphabetic, etc.) of the attribu te.• variable text, size N m eans that the attribu te m u st be able to hold any string of ch aracters of a variable lengthw ith a m axim u m length of N .
If the attribu te is stored as a fixed length string and the string it h old s is shorterthan N characters, it m u st be p ad d ed w ith sp aces.TPC Benchm ark™C - Stand ard Sp ecification, Revision 5.11 - Page 11 of 130• fixed text, size N m eans that the attribu te m u st be able to hold any string of characters of a fixed length of N.• date and time rep resents the d ata typ e for a d ate value th at inclu d es a tim e com ponent. The d ate com p onentm u st be able to hold any d ate betw een 1 st Janu ary 1900 and 31st Decem ber 2100. The tim e com p onent m u st becap able of rep resenting the range of tim e valu es from 00:00:00 to 23:59:59 w ith a resolu tion of at least onesecond .
Date and Tim e m ust be im p lem ented u sing d ata typ es that are d efined by the DBMS for that u se.• numeric(m [,n]) m eans an u nsigned nu m eric valu e w ith at least m total d ecim al d igits, of w hich n d igits areto the right (after) the d ecim al p oint. The attribu te m u st be able to hold all p ossible valu es w hich can beexp ressed as nu m eric(m ,n). Om itting n, as in nu m eric(m ), ind icates the sam e as nu m eric(m ,0). N u m ericfield s that contain m onetary valu es (W_YTD, D_YTD, C_CREDIT_LIM, C_BALA N CE, C_YTD_PAYMENT,H _AMOUN T, OL_AMOUN T, I_PRICE) m u st u se d ata typ es that are d efined by the DBMS as being an exactnu m eric d ata typ e or that satisfy the AN SI SQL Stand ard d efinition of being an exact nu m eric rep resentation.• signed numeric(m [,n]) is id entical to nu m eric(m [,n]) excep t that it can rep resent both p ositive and negativevalu es.• null m eans ou t of the range of valid valu es for a given attribu te and alw ays the sam e valu e for that attribu te.Comment 1: For each table, the follow ing list of attribu tes can be im p lem ented in any ord er, u sing any p hysicalrep resentation available from the tested system .Comment 2: Table and attribu te nam es are u sed for illu stration p u rp oses only; d ifferent nam es m ay be u sed by th eim p lem entation.Comment 3: A signed numeric d ata typ e m ay be u sed (at the sp onsor‟ s d iscretion) anyw here a numeric d ata typ eis d efined .WAREHOUSE Table LayoutField N am eField DefinitionCom m entsW_ID2*W u niqu e IDsW W arehouses are populatedW_N AMEvariable text, size 10W_STREET_1variable text, size 20W_STREET_2variable text, size 20W_CITYvariable text, size 20W_STATEfixed text, size 2W_ZIPfixed text, size 9W_TAXsigned nu m eric(4,4)Sales taxW_YTDsigned nu m eric(12,2)Y ear to date balancePrim ary Key: W_IDTPC Benchm ark™C - Stand ard Sp ecification, Revision 5.11 - Page 12 of 130D ISTRICT Table LayoutField N am eField DefinitionCom m entsD_ID20 u niqu e IDs10 are populated per warehouseD_W_ID2*W u niqu e IDsD_N AMEvariable text, size 10D_STREET_1variable text, size 20D_STREET_2variable text, size 20D_CITYvariable text, size 20D_STATEfixed text, size 2D_ZIPfixed text, size 9D_TAXsigned nu m eric(4,4)Sales taxD_YTDsigned nu m eric(12,2)Y ear to date balanceD_N EXT_O_ID10,000,000 u niqu e IDsN ext available Order numberPrim ary Key: (D_W_ID, D_ID)D_W_ID Foreign Key, references W_IDTPC Benchm ark™C - Stand ard Sp ecification, Revision 5.11 - Page 13 of 130CUSTOMER Table LayoutField N am eField DefinitionCom m entsC_ID96,000 u niqu e IDs3,000 are populated per districtC_D_ID20 u niqu e IDsC_W_ID2*W u niqu e IDsC_FIRSTvariable text, size 16C_MIDDLEfixed text, size 2C_LASTvariable text, size 16C_STREET_1variable text, size 20C_STREET_2variable text, size 20C_CITYvariable text, size 20C_STATEfixed text, size 2C_ZIPfixed text, size 9C_PH ON Efixed text, size 16C_SIN CEd ate and tim eC_CREDITfixed text, size 2C_CREDIT_LIMsigned nu m eric(12, 2)C_DISCOUN Tsigned nu m eric(4, 4)C_BALAN CEsigned nu m eric(12, 2)C_YTD_PAYMEN Tsigned nu m eric(12, 2)C_PAYMEN T_CN Tnu m eric(4)C_DELIVERY_CN Tnu m eric(4)C_DATAvariable text, size 500"GC"=good, "BC"=badM iscellaneous informationPrim ary Key: (C_W_ID, C_D_ID, C_ID)(C_W_ID, C_D_ID) Foreign Key, references (D_W_ID, D_ID)TPC Benchm ark™C - Stand ard Sp ecification, Revision 5.11 - Page 14 of 130HISTORY Table LayoutField N am eField DefinitionH _C_ID96,000 u niqu e IDsH _C_D_ID20 u niqu e IDsH _C_W_ID2*W u niqu e IDsH _D_ID20 u niqu e IDsH _W_ID2*W u niqu e IDsH _DATEd ate and tim eH _AMOUN Tsigned nu m eric(6, 2)H _DATAvariable text, size 24Com m entsM iscellaneous informationPrim ary Key: none(H _C_W_ID, H _C_D_ID, H _C_ID) Foreign Key, references (C_W_ID, C_D_ID, C_ID)(H _W_ID, H _D_ID) Foreign Key, references (D_W_ID, D_ID)Comment: Row s in the H istory table d o not have a p rim ary key as, w ithin the context of thebenchm ark, there is no need to u niqu ely id entify a row w ithin this table.N ote: The TPC-C ap p lication d oes not have to be cap able of u tilizing the increased range of C_IDvalu es beyond 6,000.N EW-ORD ER Table LayoutField N am eField DefinitionN O_O_ID10,000,000 u niqu e IDsN O_D_ID20 u niqu e IDsN O_W_ID2*W u niqu e IDsCom m entsPrim ary Key: (N O_W_ID, N O_D_ID, N O_O_ID)(N O_W_ID, N O_D_ID, N O_O_ID) Foreign Key, references (O_W_ID, O_D_ID, O_ID)TPC Benchm ark™C - Stand ard Sp ecification, Revision 5.11 - Page 15 of 130ORD ER Table LayoutField N am eField DefinitionO_ID10,000,000 u niqu e IDsO_D_ID20 u niqu e IDsO_W_ID2*W u niqu e IDsO_C_ID96,000 u niqu e IDsO_EN TRY_Dd ate and tim eO_CARRIER_ID10 u niqu e IDs, or nu llO_OL_CN Tnu m eric(2)O_ALL_LOCALnu m eric(1)Com m entsCount of Order-LinesPrim ary Key: (O_W_ID, O_D_ID, O_ID)(O_W_ID, O_D_ID, O_C_ID) Foreign Key, references (C_W_ID, C_D_ID, C_ID)ORD ER-LIN E Table LayoutField N am eField DefinitionOL_O_ID10,000,000 u niqu e IDsOL_D_ID20 u niqu e IDsOL_W_ID2*W u niqu e IDsOL_N UMBER15 u niqu e IDsOL_I_ID200,000 u niqu e IDsOL_SUPPLY_W_ID2*W u niqu e IDsOL_DELIVERY_Dd ate and tim e, or nu llOL_QUAN TITYnu m eric(2)OL_AMOUN Tsigned nu m eric(6, 2)OL_DIST_IN FOfixed text, size 24Com m entsPrim ary Key: (OL_W_ID, OL_D_ID, OL_O_ID, OL_NUMBER)(OL_W_ID, OL_D_ID, OL_O_ID) Foreign Key, references (O_W_ID, O_D_ID, O_ID)(OL_SUPPLY_W_ID, OL_I_ID) Foreign Key, references (S_W_ID, S_I_ID)TPC Benchm ark™C - Stand ard Sp ecification, Revision 5.11 - Page 16 of 130ITEM Table LayoutField N am eField DefinitionCom m entsI_ID200,000 u niqu e IDs100,000 items are populatedI_IM_ID200,000 u niqu e IDsImage ID associated to ItemI_N AMEvariable text, size 24I_PRICEnu m eric(5, 2)I_DATAvariable text, size 50Brand informationField N am eField DefinitionCom m entsS_I_ID200,000 u niqu e IDs100,000 populated per warehouseS_W_ID2*W u niqu e IDsS_QUAN TITYsigned nu m eric(4)S_DIST_01fixed text, size 24S_DIST_02fixed text, size 24S_DIST_03fixed text, size 24S_DIST_04fixed text, size 24S_DIST_05fixed text, size 24S_DIST_06fixed text, size 24S_DIST_07fixed text, size 24S_DIST_08fixed text, size 24S_DIST_09fixed text, size 24S_DIST_10fixed text, size 24S_YTDnu m eric(8)S_ORDER_CN Tnu m eric(4)S_REMOTE_CN Tnu m eric(4)S_DATAvariable text, size 50Prim ary Key: I_IDSTOCK Table LayoutM ake informationPrim ary Key: (S_W_ID, S_I_ID)S_W_ID Foreign Key, references W_IDS_I_ID Foreign Key, references I_IDTPC Benchm ark™C - Stand ard Sp ecification, Revision 5.11 - Page 17 of 1301.4Implementation Rules1.4.1The p hysical clu sterin g of record s w ithin the d atabase is allow ed .1.4.2A view w hich rep resents the row s to avoid logical read / w rites is exclu d ed .Comment: The intent of this clau se is to insu re that the ap p lication im p lem ents the nu m ber of logical op erationsd efined in the transaction profiles w ithou t com bining several op erations in one, via the u se of a view .1.4.3All tables m u st have the p rop erly scaled nu m ber of row s as d efined by the d atabase p op u lationrequ irem ents (see Clau se 4.3).1.4.4H orizontal p artitioning of tables is allow ed .