OracleTimesTenIn-MemoryDatabaseIntroductionRelease7.0B31687-01Copyright©1996,2007,Oracle.Allrightsreserved.ALLSOFTWAREANDDOCUMENTATION(WHETHERINHARDCOPYORELECTRONICFORM)ENCLOSEDANDONTHECOMPACTDISC(S)ARESUBJECTTOTHELICENSEAGREEMENT.Thedocumentationstoredonthecompactdisc(s)maybeprintedbylicenseeforlicensee’sinternaluseonly.Exceptfortheforegoing,nopartofthisdocumentation(whetherinhardcopyorelectronicform)maybereproducedortransmittedinanyformbyanymeans,electronicormechanical,includingphotocopying,recording,oranyinformationstorageandretrievalsystem,withoutthepriorwrittenpermissionofTimesTenInc.Oracle,JDEdwards,PeopleSoft,Retek,TimesTen,theTimesTenicon,MicroLoggingandDirectDataAccessaretrademarksorreg-isteredtrademarksofOracleCorporationand/oritsaffiliates.Othernamesmaybetrademarksoftheirrespectiveowners.ThePrograms(whichincludeboththesoftwareanddocumenta-tion)containproprietaryinformation;theyareprovidedunderali-censeagreementcontainingrestrictionsonuseanddisclosureandarealsoprotectedbycopyright,patent,andotherintellectualandindustrialpropertylaws.Reverseengineering,disassembly,orde-compilationofthePrograms,excepttotheextentrequiredtoobtaininteroperabilitywithotherindependentlycreatedsoftwareorasspecifiedbylaw,isprohibited.Theinformationcontainedinthisdocumentissubjecttochangewithoutnotice.Ifyoufindanyproblemsinthedocumentation,pleasereportthemtousinwriting.Thisdocumentisnotwarrantedtobeerror-free.Exceptasmaybeexpresslypermittedinyourli-censeagreementforthesePrograms,nopartoftheseProgramsmaybereproducedortransmittedinanyformorbyanymeans,elec-tronicormechanical,foranypurpose.February2007PrintedintheUnitedStatesofAmericaiiiContentsAboutthisGuideTimesTendocumentation.....................1Backgroundreading.......................3Conventionsusedinthisguide...................4TechnicalSupport........................61WhatisOracleTimesTenIn-MemoryDatabase?WhyisOracleTimesTenIn-MemoryDatabaseFast?..........8TimesTenFeatureOverview....................10ODBCandJDBCinterfaces...................10SQLfunctionality.......................10AccessControl........................10Distributedtransactions....................11Databaseconnectivity.....................11Durability..........................11Queryoptimization......................12Concurrency.........................12Automaticdataaging.....................13Globalizationsupport.....................13Transactionlogmonitoring...................13Administrationandutilities...................14Replication–TimesTentoTimesTen...............14CacheConnecttoOracle....................142HowisTimesTenUsed?GeneralUsesforTimesTen....................18TimesTenApplicationScenarios..................19Scenario1:Callerusagemeteringapplication............19Scenario2:Real-timequoteserviceapplication...........22Scenario3:Callcenterapplication................243TimesTenComponentsTimesTenBasicArchitecture....................26Sharedlibraries........................26Memory-residentdatastructures.................27Databaseprocesses......................27Administrativeprograms....................27Checkpointandlogfiles....................27ivOracleTimesTenIn-MemoryDatabaseIntroductionReplicationArchitecture......................28CacheConnectArchitecture....................30TimesTenConnectionOptions...................31Directdriverconnection....................31Client/serverconnection....................31Drivermanagerconnection...................32TimesTenAPIs.........................33TransactionLogAPI......................33DistributedTransactionProcessingAPIs..............33TTClasses..........................33ForMoreInformation.......................334ConcurrentOperationsTransactionIsolation.......................36Readcommittedisolation....................36Serializableisolation......................37Locks.............................38Database-levellocking.....................38Table-levellocking......................38Row-levellocking.......................39ForMoreInformation.......................395QueryOptimizationOptimizationTimeandMemoryUsage................42Statistics............................42OptimizerHints.........................42IndexingTechniques.......................43T-treeindexes........................43Hashindexes.........................44ScanMethods..........................44JoinMethods..........................45Nestedloopjoin.......................45Mergejoin..........................46OptimizerPlan.........................47ForMoreInformation.......................486DataAvailabilityandIntegrityLogging............................49Writingthelogbuffertodisk..................49Whenarelogfilesdeleted?...................50Disablinglogging.......................50Checkpointing..........................50ContentsvNonblockingcheckpoints....................51Blockingcheckpoints.....................51Recoveryfromlogandcheckpointfiles..............51Replication...........................51Replicationconfigurations...................52Activestandbypair.....