Icon View Thread

The following is the text of the current message along with any replies.
Messages 1 to 2 of 2 total
Thread SQL and Locking..
Sun, Oct 29 2006 11:35 PMPermanent Link

"Ralf Bertoldi"
Hi,

if I would do this SQL Statement in ElevateDB:

"INSERT INTO table1....;
UPDATE table2....;
UPDATE table2 SET id=LASTAUTOINC(''table1'') WHERE...;"

AFAIR you told that locking changed...

Insert one record in table1.. after that a lot of updates on table2.

If the SQL is embedded in a Transaction will the 3.rd command get the
correct lastautoinc from table1 even if someone else is inserting in
table1?

I think of, if all the tables are not locked anymore (recordbased?) and
during updates of table2 (takes a long time...)..
what happens in a network when during updates of table2 someone inserts
new records to table1?...

I insert 1 record in table1.
Update on table2 lasts a couple of sec.
....

during that time someone else would like to insert into table1.
Does the other user has to wait till the transaction is finished?

At the time I do some redesign of a DB,..  and so I don't know if I
should put some GUID's in table1, so I don't have to wait for the
autoinc value... and split some sql commands...

Thanks,
Ralf


--
Mon, Oct 30 2006 4:00 PMPermanent Link

Tim Young [Elevate Software]

Elevate Software, Inc.

Avatar

Email timyoung@elevatesoft.com

Ralf,

<< AFAIR you told that locking changed... >>

Not with respect to transactions and rows - that stuff is the same as with
DBISAM.

--
Tim Young
Elevate Software
www.elevatesoft.com

Image