Re: LOCKING problem
Posted in 1997
Cosmo Lee wrote:
>
> Online DSA 7.22, Unixware 2.1., row-level locking on tables
>
> I'm trying to load all the data from one table into another using the
> following:
>
> insert into tab_2
> select * from tab_1; >
> I noticed that as soon as I run this, the number of locks shoot
> through
> the roof. I thought that the problem was the isolation level causing
> the rows in the selected table to be locked, so I used the following:
>
> set isolation to dirty read; >
> This did not help.
>
> So, I thought, OK, I'm wrong, how about locking the table - in fact I
> lock _both_ tables. To my surprise, locking both tables has no
> effect.
> I run my query and the locks still go through the roof and I max out
> in
> minutes.
>
> begin work;
> lock table tab_1 in share mode;
> lock table tab_2 in share mode;
>
> What's up with dat???
Try locking the tables in exclusive mode.
Are you using PAGE level or ROW level locking?
Hope that helps,
--
Mark.
+----------------------------------------------------------+-----------+
|Mark D. Stock - Informix SA http://www.informix.com |//////// /|
|mailto:mdstock@informix.com FAQ http://www.iiug.org |///// / //|
| +-----------------------------------+//// / ///|
| Tel: +27 11 807 0313 |If it's slow, the users complain. |/// / ////|
| Fax: +27 11 807 2594 |If it's fast, the users keep quiet.|// / /////|
|Cell: +27 83 250 2325 |Therefore, "No news: travels fast"!|/ ////////|
+----------------------+-----------------------------------+-----------+