Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations wOOdy-Soft on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

INSERT INTO, APPEND BLANK and File/Record Locking

Status
Not open for further replies.

SGLong

Programmer
Jun 6, 2000
405
US
I've been pouring through my help files and manuals looking for guidance on which procedure is better in a large networked application - INSERT INTO or APPEND BLANK / REPLACE. I seem to recall that INSERT INTO is the preferred method because it doesn't lock the table nearly as along as the APPEND BLANK and REPLACE method. Is that correct? Is there a better way to add records that will then be "SEEK'd" and updated?

Steve
 
The INSERT INTO is definitely better especially if you have multiple indexes on the table, as they can all be "fixed" at once (again saving both IO and LOCKs) rather than one at a time in the typical multiple REPLACES. Also, if you have a Primary or Candidate key(s), then the DBC code won't have to validate these twice (BLANK and then the real value).

Rick
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top