Use the Lock Table Command to Improve Performance

The lock table command allows you to explicitly request a table lock for the duration of a transaction. This is useful when an immediate table lock may reduce the overhead of acquiring a large number of row or page locks and save locking time.

Examples of such cases are:

The syntax of lock table is:

lock table table_name in {share | exclusive} mode
          [wait [no_of_seconds] | nowait]

The wait/nowait option allows you to specify how long the command waits to acquire a table lock if it is blocked

These considerations apply to the use of lock table:
Related concepts
wait/nowait Option of the Lock Table Command