Reduce number of locks?

Reduce number of locks?

Post by Kenneth L » Fri, 07 Feb 1997 04:00:00



I've written this C program to manipulate data in one table and then insert
it into another.  However, I've noticed that it generates an incredible
number of Non Cursor Locks.  This is not problematic for small updates, but
I have noticed considerable problems when updating into an empty table.  Is
there a way to reduce the number of locks?  The current program logic goes
as follows:

1) Create two connections (a and b) to database
2) Connection A grabs data from table
3) Do calculations, what have you
4) Insert into table B
5) Repeat 2 until done

The target table has roughly 200,000 rows compared to the 7,000 of the
source table.  Any suggestions are welcome; please email them to me at

Thanks,
Ken

 
 
 

Reduce number of locks?

Post by H.S. Prasad 4-839 » Sat, 08 Feb 1997 04:00:00


Kenneth,

Close connection B every so often, say few hundred/thousand rows.  This in
effect will commit your transaction and will release the locks.  Then re-open
connection B and continue the process.

-Prasad


>I've written this C program to manipulate data in one table and then insert
>it into another.  However, I've noticed that it generates an incredible
>number of Non Cursor Locks.  This is not problematic for small updates, but
>I have noticed considerable problems when updating into an empty table.  Is
>there a way to reduce the number of locks?  The current program logic goes
>as follows:

>1) Create two connections (a and b) to database
>2) Connection A grabs data from table
>3) Do calculations, what have you
>4) Insert into table B
>5) Repeat 2 until done

>The target table has roughly 200,000 rows compared to the 7,000 of the
>source table.  Any suggestions are welcome; please email them to me at

>Thanks,
>Ken

--
/***********************************************************************/
H.S. Prasad                                     Standard Disclaimer

Phone: (302)634-8398
Fax  : (302)634-8563
/***********************************************************************/

 
 
 

1. 18 digit number to be reduced to 12 (or less) for bar codes

We have a long identifying number generated at a site that consists of the
site number and the date and time, so we get XXXXXXddmmyyhhmiss, an 18 digit
number but this is too long and we need means to compress this to a maximum
of 12 digits for use as a UPC bar code.

The location identifier has to be a minimum of 6 digits as there over 100K
sites in North America alone, other geographic areas are not of concern as
these will have their own data centres and the numbers can be repeated.

We have considered various other means to allocate the data and time but
cannot reduce this sufficiently and maintain accuracy to a second.

Another alternative was to simply append a 6 digit number to the location
identifier, however this presents problem to the equipment at each site with
regard to tracking, expecially if a reboot is required. There are possible
solutions to this too but they are complex and expensive.

Does anybody have any suggestions?

--
Michael MacGregor
Senior Database Manager
Timeline Technology Inc.
www.timelinetech.com

2. Ingres to Oracle Data types

3. How to reduce number of data files?

4. Cognos Impromptu/PP how-to question

5. How to get a reduced number of rows

6. ADO Error 3706 Provider Not Found

7. paradox client server?

8. Extents - Reducing Number Of

9. Best way to reduce number of extents?

10. Reducing hte number of SQL statements

11. Reducing the number of Datafiles

12. Newbie question: Reduce to six numbers