Retro video games delivered to your door every month!
Click above to get retro games delivered to your door ever month!
X-Hacker.org- SIx Driver RDD v3.00 - Reference Guide - <b>what is turboread?:</b> http://www.X-Hacker.org [<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
  What is TURBOREAD?:

  Did you know that Clipper automatically puts a file lock on your index
  file when you do any record pointer movement (SEEKs, SKIPs, etc...) on a
  network?  This means that anyone else on the network has to wait for your
  SEEK to finish before they can do a SEEK...or a record update...or an
  append...or a delete.  Needless to say, this can cause quite a bit of
  slowing on a large database with a lot of users.

  By using the SIx Driver's SET TURBOREAD ON command, you turn off Clipper's
  forced index locking, allowing your application to run faster.  However,
  if you turn off the index locking, this means that if somebody does an
  update during your SEEK, it may throw the record pointers off.  Your SEEK
  may point to the wrong record!  So, you may be wondering when and how to
  use SET TURBOREAD ON safely.  Here are some situations:

   *  On some large systems, network users input their new data into
      temporary database files.  Then, batch updates are done on the
      primary database files at night, appending the new data from the
      temporary files.  During the day, the network users would only be
      accessing the primary database files for queries and reports, but
      no direct updates.

      In this case, during the day, you can SET TURBOREAD ON without a
      care.  Since you know that nobody will be performing updates, there
      is no reason at all to lock the index files.


   *  In cases where network users are doing updates directly on the
      primary database, you could use the SIx Driver's semaphore-locking
      functions to prevent index corruption.  Take a look at the descrip-
      tions in the SIx Driver Functions section on the following
      semaphore-related functions:

         Sx_MakeSem()  -  Creates a semaphore file
         Sx_IsSem()    -  Checks for the existence of a semaphore file
         Sx_KillSem()  -  Deletes a semaphore file

      Network users that want fast access to the database and indexes should
      call Sx_MakeSem() to signal that no updates should be done.  Then SET
      TURBOREAD ON and blaze through the file.  When done, SET TURBOREAD
      OFF and call Sx_KillSem() to allow other users to update the index.


  WARNING:  As a general rule, NO updating should be done on a network with
            with SET TURBOREAD ON.  This is extremely risky, and could
            result in index and/or data corruption.


See Also: SET TURBOREAD Sx_MakeSem() Sx_IsSem() Sx_KillSem()

Online resources provided by: http://www.X-Hacker.org --- NG 2 HTML conversion by Dave Pearson