Re: Do SELECT statemetns create any locks on a 5.X OnLine Engine
Posted in 1996
tgill@lynx.dac.neu.edu (Todd Gill) wrote: Unless you declare a cursor for update or delete, a cursor should not create locks on the selected tables. Of course if you happen to execute a cursor against a locked table, page or row, your program is likely to fail, otherwise there should be no direct conflict with other running programs. The word of caution when using a SELECT * or large cursors is more in making sure that there is sufficient free pages in the dbspace. Also keep in mind that Informix usually uses /tmp to create temporary sort files, so make sure the filesystem with /tmp has enough free space or set the Informix variable DBTEMP to a directory on a large filesystem >I've read the FAQ and documentation, but can't seem to find an answer to my >(naive?) question. >I am writing an application that I don't want to interfere with other >applications accessing (doing update/inserts) the same database. Will >declaring a cursor with hold for a query select * from some_table create >any locks that the other processes might contend with? The database is >using logging if that matters. I am using ESQL/C against a 5.X OnLine >engine. >Thanks for any help, >Todd Gill >tgill@lynx.dac.neu.edu