5 great oracle myths

Upload: shajayd

Post on 07-Apr-2018

236 views

Category:

Documents


0 download

TRANSCRIPT

  • 8/4/2019 5 Great Oracle Myths

    1/15

    30/08/2011 Niall Litchfield - Audit Commission 1

    Oracle MythsOracle Myths Avoiding Bad Ideas in OracleAvoiding Bad Ideas in Oracle

    ManagementManagement

    Niall LitchfieldNiall Litchfield

    Oracle DBAOracle DBA

  • 8/4/2019 5 Great Oracle Myths

    2/15

    30/08/2011 Niall Litchfield - Audit Commission 2

    Mything In ActionMything In Action

    Managing Oracle is a complex task.Managing Oracle is a complex task.

    Dont rely on folkloreDont rely on folklore

    Dont believe everything you readDont believe everything you read Everyone screws up sometimesEveryone screws up sometimes

  • 8/4/2019 5 Great Oracle Myths

    3/15

    30/08/2011 Niall Litchfield - Audit Commission 3

    Getting it rightGetting it right

    Document your aimsDocument your aims

    Document your assumptionsDocument your assumptions

    List the strategiesList the strategies Think Business not OracleThink Business not Oracle

    Benchmark your ideasBenchmark your ideas

  • 8/4/2019 5 Great Oracle Myths

    4/15

    30/08/2011 Niall Litchfield - Audit Commission 4

    The MythsThe Myths

    Separating Data and Indexes improvesSeparating Data and Indexes improvesperformanceperformance

    A High cache hit ratio indicates goodA High cache hit ratio indicates good

    performanceperformance Use the most selective column first in a multiUse the most selective column first in a multi--

    column indexcolumn index

    Store objects in as few extents as possible,Store objects in as few extents as possible,

    preferably onepreferably one Set PCTIncrease to zero for tables and 1% forSet PCTIncrease to zero for tables and 1% for

    tablespacestablespaces

  • 8/4/2019 5 Great Oracle Myths

    5/15

    30/08/2011 Niall Litchfield - Audit Commission 5

    Why do we believe all this?Why do we believe all this?

    Myths almost all have a basis in factMyths almost all have a basis in fact

    But those facts may no longer be validBut those facts may no longer be valid

    We dont test.We dont test. We believe experts.We believe experts.

  • 8/4/2019 5 Great Oracle Myths

    6/15

    30/08/2011 Niall Litchfield - Audit Commission 6

    Separate Data and IndexesSeparate Data and Indexes --11

    The basisThe basis io distributionio distribution

    Serial accessSerial access

    Multiple usersMultiple users SMONSMON

  • 8/4/2019 5 Great Oracle Myths

    7/15

    30/08/2011 Niall Litchfield - Audit Commission 7

    Separate Data and IndexesSeparate Data and Indexes --22

    FilesystemsFilesystems

    LVM and Cached ControllersLVM and Cached Controllers

    Parent/ChildParent/Child Stripe your io across devicesStripe your io across devices

  • 8/4/2019 5 Great Oracle Myths

    8/15

    30/08/2011 Niall Litchfield - Audit Commission 8

    High cache hit ratio is goodHigh cache hit ratio is good

    The basisThe basis physical reads are expensivephysical reads are expensiveso minimise themso minimise them

    So is logical ioSo is logical ioAn ExampleAn Example

    Go_faster.sqlGo_faster.sql

    How to calculate BCHR.How to calculate BCHR.Buffer is pinned, sort direct writes?Buffer is pinned, sort direct writes?

    Minimise your io. Period.Minimise your io. Period.

  • 8/4/2019 5 Great Oracle Myths

    9/15

    30/08/2011 Niall Litchfield - Audit Commission 9

    Use the most selective column firstUse the most selective column first

    The basisThe basis the CBO will use the selectivitythe CBO will use the selectivityof the column to determine the usefulnessof the column to determine the usefulness

    of the indexof the index It isnt as simple as thatIt isnt as simple as that

    Compressible indexesCompressible indexes

    IndexSkip

    ScanIndex

    Skip

    Scan

    Work with the optimiser but know what itWork with the optimiser but know what itdoes.does.

  • 8/4/2019 5 Great Oracle Myths

    10/15

    30/08/2011 Niall Litchfield - Audit Commission 10

    Know what the Optimiser DoesKnow what the Optimiser Does

    RBO OperationRBO Operation

    Myths about CBOMyths about CBO

    10053 Trace10053 Trace ((resultsresults)) Brietling 2002Brietling 2002

    SeminarSeminar

  • 8/4/2019 5 Great Oracle Myths

    11/15

    30/08/2011 Niall Litchfield - Audit Commission 11

    Store objects in one extentStore objects in one extent

    The basisThe basis unknown.unknown.

    There is a strong argument for arrangingThere is a strong argument for arranging

    objects into tablespaces based on uniformobjects into tablespaces based on uniformextent sizesextent sizes

    You cant do it anyway.You cant do it anyway.

    Packaged appsPackaged apps Store in LMT tablespaces of appropriateStore in LMT tablespaces of appropriate

    size extentssize extents

  • 8/4/2019 5 Great Oracle Myths

    12/15

    30/08/2011 Niall Litchfield - Audit Commission 12

    Set PCTIncreaseSet PCTIncrease

    The basisThe basis avoid fragmentationavoid fragmentation

    Packaged appsPackaged apps

    Temp tablesTemp tables DBA/dev oversightDBA/dev oversight

    Symptom/Problem confusionSymptom/Problem confusion

    A better way LMTsA better way LMTs

  • 8/4/2019 5 Great Oracle Myths

    13/15

    30/08/2011 Niall Litchfield - Audit Commission 13

    The way forwardThe way forward

    Rules of thumb are second bestRules of thumb are second best

    State the assumptions for your designsState the assumptions for your designs

    Test themTest them Refine the test for new releasesRefine the test for new releases

    Be ScepticalBe Sceptical

  • 8/4/2019 5 Great Oracle Myths

    14/15

    30/08/2011 Niall Litchfield - Audit Commission 14

    CreditsCredits

    Connor McDonaldConnor McDonald Choose_a_hit_ratio.sqlChoose_a_hit_ratio.sqlwww.oracledba.co.ukwww.oracledba.co.uk

    Jonathan LewisJonathan Lewis how calculations of BCHR are wrong.how calculations of BCHR are wrong.http://www.jlcomp.demon.co.ukhttp://www.jlcomp.demon.co.uk

    Howard RogersHoward Rogers Notes on separate data/indexesNotes on separate data/indexeshttp://groups.google.comhttp://groups.google.com

    Tom KyteTom Kyte Compressible indexes and Index Skip ScanCompressible indexes and Index Skip Scanhttp://asktom.oracle.comhttp://asktom.oracle.com

    Julian DykeJulian Dyke Notes on compressible indexesNotes on compressible indexes Wolfgang BreitlingWolfgang Breitling 10053 trace and what it means.10053 trace and what it means.

    www.hotsos.comwww.hotsos.com

    My SiteMy Site near emptynear empty www.niall.litchfield.dial.pipex.comwww.niall.litchfield.dial.pipex.com

  • 8/4/2019 5 Great Oracle Myths

    15/15

    30/08/2011 Niall Litchfield - Audit Commission 15

    Over to youOver to you