▁statement ▁takes ▁the ▁form ▁of ▁a ▁template ▁into ▁which ▁certain ▁constant ▁values ▁are ▁subst it uted ▁during ▁each ▁execution . ▁ ▁The ▁typical ▁workflow ▁of ▁using ▁a ▁prepared ▁statement ▁is ▁as ▁follows : ▁▁ ▁P rep are : ▁At ▁first , ▁the ▁application ▁creates ▁the ▁statement ▁template ▁and ▁sends ▁it ▁to ▁the ▁DB MS . ▁C ertain ▁values ▁are ▁left ▁un spec ified , ▁called ▁parameters , ▁place hold ers ▁or ▁bind ▁variables ▁( label led ▁" ?" ▁below ): ▁▁▁ ▁Then , ▁the ▁DB MS ▁comp iles ▁( par s es , ▁optim izes ▁and ▁transl ates ) ▁the ▁statement ▁template , ▁and ▁stores ▁the ▁result ▁without ▁executing ▁it . ▁ ▁Exec ute : ▁At ▁a ▁later ▁time , ▁the ▁application ▁supplies ▁( or ▁bind s ) ▁values ▁for ▁the ▁parameters ▁of ▁the ▁statement ▁template , ▁and ▁the ▁DB MS ▁executes ▁the ▁statement ▁( poss ibly ▁returning ▁a ▁result ). ▁The ▁application ▁may ▁execute ▁the ▁statement ▁as ▁many ▁times ▁as ▁it ▁wants ▁with ▁different ▁values . ▁In ▁the ▁above ▁example , ▁it ▁might ▁supply ▁" bi ke " ▁for ▁the ▁first ▁parameter ▁and ▁" 1 0 9 0 0 " ▁for ▁the ▁second ▁parameter . ▁ ▁As ▁compared ▁to ▁executing ▁statements ▁directly , ▁prepared ▁statements ▁offer ▁two ▁main ▁advantages : ▁▁ ▁The ▁overhead ▁of ▁compiling ▁the ▁statement ▁is ▁in cur red ▁only ▁once , ▁although ▁the ▁statement ▁is ▁executed ▁multiple ▁times . ▁However ▁not ▁all ▁optimization ▁can ▁be ▁performed ▁at ▁the ▁time ▁the ▁statement ▁template ▁is ▁compiled , ▁for ▁two ▁reasons :