Icon View Thread

The following is the text of the current message along with any replies.
Messages 1 to 5 of 5 total
Thread Error 10258 when usnig SQL to delete a lot of rows
Sat, Jul 7 2007 11:22 AMPermanent Link

Dave Harrison
I'm using Sysutil v4.25 and I'm trying to delete a few million rows
using something like:

delete from table1 where col1 like '%.x' or col1 like '%.y';

This will execute for 15 minutes or so and will get 50% to 75% complete
then it will throw an error:

"DBISAM Engine Error # 10258 Cannot lock record in the table 'table1'";

This is odd because there is nothing else running on the computer, only
DbSys and of course nothing else is trying to access this table.

I've run a Verify table and everything is ok.

So why can't it get a lock on the table? I've tried it 3 times and it
can never finish deleting the rows. TIA

Dave
Sat, Jul 7 2007 11:41 AMPermanent Link

Dave Harrison
I was able to "solve" the problem by executing it in 2 Delete statements
as in:

delete from table1 where col1 like '%.x';

delete from table1 where col1 like '%.y';

and they completed ok. The first statement deleted 1.9 million rows and
the second statement deleted approx 400k rows.

Dave
Mon, Jul 9 2007 5:06 PMPermanent Link

Tim Young [Elevate Software]

Elevate Software, Inc.

Avatar

Email timyoung@elevatesoft.com

Dave,

<< This will execute for 15 minutes or so and will get 50% to 75% complete
then it will throw an error:

"DBISAM Engine Error # 10258 Cannot lock record in the table 'table1'";

This is odd because there is nothing else running on the computer, only
DbSys and of course nothing else is trying to access this table.

I've run a Verify table and everything is ok.

So why can't it get a lock on the table? I've tried it 3 times and it can
never finish deleting the rows. TIA >>

It's a record lock that it is having trouble with.  However, I don't know
why since DBISAM uses a bitmap for the record locks, and it should be able
to handle that many record deletions in one transaction.  My guess is that
DBISAM is hitting a memory limit somewhere and that is causing the issue.
Is there any chance I can get a download or FTP link for the table in
question ?

--
Tim Young
Elevate Software
www.elevatesoft.com

Mon, Jul 9 2007 9:45 PMPermanent Link

Dave Harrison
Tim Young [Elevate Software] wrote:
> Dave,
>
> << This will execute for 15 minutes or so and will get 50% to 75% complete
> then it will throw an error:
>
>  "DBISAM Engine Error # 10258 Cannot lock record in the table 'table1'";
>
>  This is odd because there is nothing else running on the computer, only
> DbSys and of course nothing else is trying to access this table.
>
>  I've run a Verify table and everything is ok.
>
>  So why can't it get a lock on the table? I've tried it 3 times and it can
> never finish deleting the rows. TIA >>
>
> It's a record lock that it is having trouble with.  However, I don't know
> why since DBISAM uses a bitmap for the record locks, and it should be able
> to handle that many record deletions in one transaction.  My guess is that
> DBISAM is hitting a memory limit somewhere and that is causing the issue.
> Is there any chance I can get a download or FTP link for the table in
> question ?
>
Tim,
   I'm afraid I can't release the data. But I can try and generate
random data with a similar schema and see if that fails. I'll get back
to you on this.

Dave
Tue, Jul 10 2007 11:52 AMPermanent Link

Tim Young [Elevate Software]

Elevate Software, Inc.

Avatar

Email timyoung@elevatesoft.com

Dave,

<< I'm afraid I can't release the data. But I can try and generate random
data with a similar schema and see if that fails. I'll get back to you on
this. >>

Thanks.  I would try to use a similar table here, but a lot depends upon
factors such as the row size, etc. when it comes to memory/capacity issues.

--
Tim Young
Elevate Software
www.elevatesoft.com

Image