Use of "SET ISOLATION TO DIRTY READ"
Posted in 2010
Topics: Transactions, Locking & Isolation
Using IDS 11.5.xC6, we've had a few occasions where user queries on one particular table in our application have resulted in errors like "-243 Could not position within a table". Executing "SET ISOLATION TO DIRTY READ" first and then running the query resolves the issues. So, is it possible to alter something in the database so that by default every query on this one particular table is done with an isolation level of dirty read? Or is the only solution to change every query in the application that queries this table to execute SET ISOLATION TO DIRTY READ before executing a SELECT?
You could customize several user session issues, using the sysdbopen / sysdbclose procedures. Check it out over Information Center links. Best regards! Em 05/11/2010 12:39, STUART BROOKS escreveu: > Using IDS 11.5.xC6, we've had a few occasions where user queries on one > particular table in our application have resulted in errors like "-243 Could > not position within a table". Executing "SET ISOLATION TO DIRTY READ" first > and then running the query resolves the issues. > > So, is it possible to alter something in the database so that by default every > query on this one particular table is done with an isolation level of dirty > read? Or is the only solution to change every query in the application that > queries this table to execute SET ISOLATION TO DIRTY READ before executing a > SELECT? > > > ******************************************************************************* > Forum Note: Use "Reply" to post a response in the discussion forum. > > -- Alexandre Marini Tecnologia da Informação - DBA msn: alexandre_marini@hotmail.com SEFAZ-MS / SGI-UGSR / Sistemas IBM-Informix Cert-Info-Mgmt_color <Cert-Info-Mgmt_color.jpg> IBM Informix Dynamic Server Certified Professional V10 / V11
On Fri, Nov 5, 2010 at 4:39 PM, STUART BROOKS <brooksst@uk.ibm.com> wrote: > Using IDS 11.5.xC6, we've had a few occasions where user queries on one > particular table in our application have resulted in errors like "-243 > Could > not position within a table". Executing "SET ISOLATION TO DIRTY READ" first > and then running the query resolves the issues. > > So, is it possible to alter something in the database so that by default > every > query on this one particular table is done with an isolation level of dirty > read? Or is the only solution to change every query in the application that > queries this table to execute SET ISOLATION TO DIRTY READ before executing > a > SELECT? > > > > ******************************************************************************* > Forum Note: Use "Reply" to post a response in the discussion forum. > > It's not possible to define the isolation level "per table". It's a session property. My advice: - Make sure the table has row level locking - Try to understand what changed if the errors only started now - Consider using lock mode and isolation committed read last committed. Dirty read will return "garbage". It's perfectly acceptable in some cases, but I usually see customers abusing of it Regards. -- Fernando Nunes Portugal http://informix-technology.blogspot.com My email works... but I don't check it frequently... --20cf3054ace3f79f300494512845