Re: PREPAREd statement optimization
Posted in 2005
Topics: General Discussion
malc_p@btinternet.com said: > Hello? Anybody out there? > Anyone have any clues please? Have I missed something blindingly > obvious? I'm sorry -- I have no idea what you're talking about? -- Bye now, Obnoxio "C'est pas parce qu'on n'a rien ' dire qu'il faut fermer sa gueule" - Coluche A smile is a gift that is free to the giver and precious to the recipient. But giving someone the finger is free too, and I find it more personal and sincere. sending to informix-list
It is my understanding that "PREPARE" statement was introduced to do
exectly what you see : to avoid an execution plan's rebuild every time
you open a cursor. That explains why you see sqexplain.out created only
once.
As of mysterious diffference between slow and fast cursors try to do
the same selects from dbaccess. My first guess is that it's related to
buffer hits - when you open your "fast" cursor first it populates
buffers with data needed for your "slow" cursor, so it does not need to
read those data from disk next time.