tpcc_current (Дополнительные методические материалы), страница 11
Описание файла
Файл "tpcc_current" внутри архива находится в следующих папках: Дополнительные методические материалы, TPC-C. PDF-файл из архива "Дополнительные методические материалы", который расположен в категории "". Всё это находится в предмете "структурное проектирование автоматизированных систем обработки информации и управления" из 10 семестр (2 семестр магистратуры), которые можно найти в файловом архиве МГТУ им. Н.Э.Баумана. Не смотря на прямую связь этого архива с МГТУ им. Н.Э.Баумана, его также можно найти и в других разделах. Архив можно найти в разделе "остальное", в предмете "структурное проектирование автоматизированных систем обработки информации и управления" в общих файлах.
Просмотр PDF-файла онлайн
Текст 11 страницы из PDF
The actu al requ irem ent is d efined by the d etailedtransaction p rofile below .2.7.4.2For a given w arehou se nu m ber (W_ID), for each of the 10 d istricts (D_W_ID , D_ID) w ithin thatw arehou se, and for a given carrier nu m ber (O_CARRIER_ID):• The inp u t d ata (see Clau se 2.7.3.2) are retrieved from the d eferred execu tion qu eu e.• A d atabase transaction is started u nless a d atabase transaction is alread y active from being started as par t ofthe d elivery of a p reviou s ord er (i.e., m ore than one ord er is d elivered w ithin the sam e d atabase transaction).• The row in the N EW-ORDER table w ith m atching N O_W_ID (equ als W_ID) and N O_D_ID (equ als D_ID)and w ith the low est N O_O_ID valu e is selected .
This is the old est u nd elivered ord er of that d istrict.N O_O_ID, the ord er nu m ber, is retrieved . If no m atching row is fou nd , then the d elivery of an ord er for thisd istrict is skip p ed . The cond ition in w hich no ou tstand in g ord er is p resent at a given d istrict m u st be hand ledby skip p ing the d elivery of an ord er for that d istrict only and resu m ing the d elivery of an ord er from allrem aining d istricts of the selected w arehou se. If this cond ition occu rs in m ore than 1%, or in m ore than one,w hichever is greater, of the bu siness transaction s, it m u st be rep orted .
The resu lt file m u st be organized insu ch a w ay that the p ercentage of skip p ed d eliveries and skip p ed d istricts can be d eterm ined .TPC Benchm ark™C - Stand ard Sp ecification, Revision 5.11 - Page 42 of 130• The selected row in the N EW-ORDER table is d eleted .• The row in the ORDER table w ith m atching O_W_ID (equ als W_ ID), O_D_ID (equ als D_ID), and O_ID(equ als N O_O_ID) is selected , O_C_ID, the cu stom er nu m ber, is retr ieved , and O_CARRIER_ID is u p d ated .• All row s in the ORDER-LIN E table w ith m atching OL_W_ID (equ als O_W_ID), OL_D_ID (equ als O_D_ID),and OL_O_ID (equ als O_ID) are selected .
All OL_DELIVERY_D, the d elivery d ates, are u p d ated to thecu rrent system tim e as retu rned by the op erating system and the su m of all OL_AMOUN T is retrieved .• The row in the CUSTOMER table w ith m atching C_W_ID (equ als W_ID), C_D_ID (equ als D_ID), and C_ID(equ als O_C_ID) is selected and C_BALAN CE is increased by the su m of all ord er -line am ou nts(OL_AMOUN T) p reviou sly retrieved . C_DELIVERY_CN T is increm ented by 1.• The d atabase transaction is com m itted u nless m ore ord ers w ill be d elivered w ithin this d atabase transaction.• Inform ation abou t the d elivered ord er (see Clau se 2.7.2.2) is record ed into the resu lt file (see Clau se 2.7.2.3).TPC Benchm ark™C - Stand ard Sp ecification, Revision 5.11 - Page 43 of 1302.8The Stock-Level TransactionThe Stock-Level bu siness transaction d eterm ines the nu m ber of recently sold item s that have a stock level below asp ecified threshold .
It rep resents a heavy read -only d atabase transaction w ith a low frequ ency of execu tion, arelaxed resp onse tim e requ irem ent, and relaxed consistency requ irem ents.2.8.1Input D ata Generation2.8.1.1Each term inal m u st u se a u niqu e valu e of (W_ID, D_ID) that is constant over the w holem easu rem ent, i.e., D_IDs cannot be re-u sed w ithin a w arehou se.2.8.1.22.8.2The threshold of m inim um qu antity in stock (threshold ) is selected at rand om w ithin [10 .. 20].Transaction Profile2.8.2.1Exam ining the level of stock for item s on the last 20 ord ers is d one in one or m ore d atabasetransaction s w ith the follow ing step s:1.Exam ine the next available ord er nu m ber, com p rised of:1 row selection w ith d ata retrieval.2.Exam ine all item s on the last 20 ord ers (average item s-p er-ord er = 10) for the d istrict, com p rised of:(20 * item s-p er-ord er) row selections w ith d ata retrieval.3.Exam ine, for each d istinct item selected , if the level of stock available at the hom e w arehou se is be low thethreshold , com p rised of:At m ost (20 * item s-p er-ord er) row selections w ith d ata retrieval.N ote: The above su m m ary is p rovid ed for inform ation only.
The actu al requ irem ent is d efined by the d etailedtransaction p rofile below .2.8.2.2(threshold):For a given w arehou se nu m ber (W_ID), d istrict nu m ber (D_W_ID , D_ID), and stock level threshold• The inp u t d ata (see Clau se 2.8.3.2) are com m u nicated to the SUT.• A d atabase transaction is started .• The row in the DISTRICT table w ith m atching D_W_ID and D_ID is selected and D_N EXT_O_ID is retrieved .• All row s in the ORDER-LIN E table w ith m atching OL_W_ID (equ als W_ID), OL_D_ID (equ als D_ID), andOL_O_ID (low er than D_N EXT_O_ID an d greater than or equ al to D_N EXT_O_ID m inu s 20) are selected .They are the item s for 20 recent ord ers of the d istrict.• All row s in the STOCK table w ith m atching S_I_ID (equ als OL_I_ID) and S_W_ID (equ als W_ID) from the listof d istinct item nu m bers and w ith S_QUAN TITY low er than threshold are cou nted (giving low_stock).Comment: Stocks m u st be cou nted only for d istinct item s.
Thu s, item s that have been ord ered m ore than oncein the 20 selected ord ers m u st be aggregated into a sin gle su m m ary cou nt for t hat item .TPC Benchm ark™C - Stand ard Sp ecification, Revision 5.11 - Page 44 of 130• The cu rrent d atabase transaction is com m itted .Comment: A com m it is not need ed as long as all the requ ired ACID p rop erties are satisfied (see Clau se2.8.2.3).• The ou tp u t d ata (see Clau se 2.8.3.3) are com m unicated to the term inal.2.8.2.3Full serializability and rep eatable read s are not requ ired for the Stock -Level bu siness transaction .
Alld ata read m u st be com m itted and no old er than the m ost recently com m itted d ata p rior to the tim e this bu sinesstransaction w as initiated . All other ACID p rop erties m u st be m aintained .Comment: This clau se allow s the bu siness transaction to be broken d ow n into m ore than one d atabase transaction .2.8.3Terminal I/O2.8.3.1For each transaction the originating term inal m u st d isp lay the follow ing inp u t/ ou tp u t screen w ith allinp u t and ou tp u t field s cleared (w ith either sp aces or zeros) excep t for the Warehou se and District field s w hich havenot changed and m u st d isp lay the fixed W_ID and D_ID valu es associated w ith that term inal.12345123456789012345678901234567890123456789012345678901234561Stock-Level2 Warehouse: 9999District: 9934 Stock Level Threshold: 9956 low stock: 9997891011121314151617181920212223242.8.3.2The em u lated u ser m u st enter, in the ap p rop riate field of the inp u t/ ou tp u t screen, the requ ired inp u td ata w hich is organized as the d istinct field : threshold.2.8.3.3The em u lated term inal m u st d isp lay, in the ap p rop riate field of the inp u t/ ou tp u t screen, all inp u t d ataand the ou tp u t d ata w hich resu lts from the execu tion of the transaction.
The follow ing field s are d isp layed : W_ID,D_ID, threshold, and low_stock.TPC Benchm ark™C - Stand ard Sp ecification, Revision 5.11 - Page 45 of 1302.8.3.4The follow ing table su m m arizes the term inal I/ O requirem ents for the Stock-Level transaction :EnterN on-rep eating Grou pthreshold2.8.3.5Disp layRow / Colu m nCoord inatesW_IDD_IDthresholdlow _stockFor general term inal I/ O requ irem ents, see Clau se 2.2.TPC Benchm ark™C - Stand ard Sp ecification, Revision 5.11 - Page 46 of 1302/2/4/6/12292412Clause 3: TRAN SACTION and SYSTEM PROPERTIES3.1The ACID PropertiesIt is the intent of this section to inform ally d efine the ACID p rop erties and to sp ecify a series of tests that m u st bep erform ed to d em onstrate that these p rop erties are m et.3.1.1The ACID (Atom icity, Consistency, Isolation , and Du rability) p rop erties of transaction p rocessingsystem s m u st be su p p orted by the system u nd er test d u ring the ru nning of this benchm ark.
The only excep tion tothis ru le is to allow non -rep eatable read s for the Stock-Level transaction (see Clau se 2.8.2.3).3.1.2N o finite series of tests can p rove that the ACID p rop erties are fu lly su p p orted . Passing the sp ecifiedtests is a necessary, bu t n ot su fficient, cond ition for m eeting the ACID requ irem ents. H ow ever, for fairness ofrep orting, only the tests sp ecified here are requ ired and m u st ap p ear in the Full Disclosu re Rep ort for thisbenchm ark.Comment: These tests are intend ed to d em onstrate th at the ACID p rincip les are su p p orted by the SUT and enabledd u ring the p erform ance m easu rem ent interval. They are not intend ed to be an exhau stive qu ality assu rance test.3.1.3All m echanism s need ed to insu re fu ll ACID p rop erties m u st be enabled d u ring both the test p eriodand the 8 hou rs of stead y state.
For exam p le, if the system u nd er test relies on u nd o logs, then logging m u st beenabled for all transactions inclu d ing those w hich d o not inclu d e rollback in the transaction p rofile. When thisbenchm ark is im p lem ented on a d istribu ted system , tests m u st be p erform ed to verify that hom e and rem otetransactions, inclu d ing rem ote transactions that are p rocessed on tw o or m ore nod es, satisfy the ACID p rop erties(See Clau ses 2.4.1.7, 2.4.1.8, 2.5.1.5, and 2.5.1.6 for th e d efinition of hom e and rem ote transactions).3.1.4Althou gh the ACID tests d o not exercise all transaction typ es of TPC-C, the ACID p rop erties m u st besatisfied for all the TPC-C transactions.3.1.5Test sp onsors rep orting TPC resu lts m ay p erform ACID tests on any one system for w hich resu ltshave been d isclosed , p rovid ed that they u se the sam e softw are execu tables (e.g., op erating system , d ata m anager,transaction p rogram s). For exam p le, this clau se w ou ld be ap p licable w hen resu lts are rep orted for m u ltip le system sin a p rod u ct line.