CPORDLS (Order Serial/Lot File) Btrieve Page Size

Page Size
For any Btrieve table, the page size can be from 512 bytes to 16,384 bytes as follows:
  • File Format 7 - 9.0: 512 bytes - 8192 bytes
  • File Format 9.5: 1024 bytes - 16384 bytes
A page is the minimum I/O unit when Pervasive tries to retrieve or update data to the disk.  Generally speaking, the larger the page size, the higher the I/O performance for the PSQL engine. Less I/O is needed to process the same amount of data on a smaller page size.  On the other hand, the larger the page size, the higher the chance of the page locking.  This is because more records or indexes can be stored in a larger page size, so the chance of conflict is higher.  Therefore, if you choose a smaller page size for a Btrieve file, then the slower the I/O performance and the lower the chance of a page locking conflict occurring.

Default Page Size
Generally speaking, you don't need to be concerned with the Btrieve page size.  Elliott chooses 4,096 as the default page size to achieve a balance between performance and locking.  However, there is an exception to this rule, which we will try to explain with this document.

Page Locking
When the Elliott application reads a record with a lock, it uses record locking.  That is to say, when there are multiple records in a data page, only the record that's locked is locked and users can still access other records on the same data page.  So then what is page locking for? As far as we are aware, page locking can take place in the following situations:
  • Index Page Update: In a Btrieve file, there's also the index page.  When Btrieve updates a record, it needs to update both the data page and the index page.  When it updates the index page, it will temporarily lock it. Therefore, it is possible for another user to receive a lock message due to an index page lock, even though this user is updating a different record or the record may be on a totally different data page.
  • Transaction: In various different places, Elliott uses the PSQL transaction capability to ensure data integrity.  For example, when Elliott invoices before a particular invoice starts posting, Elliott declares the start of the transaction with the PSQL engine.  After that invoice is posted, Elliott declares the end of the transaction with PSQL and proceeds to the next invoice.  If, for whatever reason, the posting stops in the middle of the process and after the Elliott task is closed, when Elliott starts up again and connects to PSQL, the engine will know that the transaction has been terminated abnormally, thus reversing the database state back to right before the invoice started posting.  This is a wonderful feature.  However, when PSQL is in a transaction, the engine has to prepare to roll back the update, so it produces extensive locks on data and index pages that have been changed to prevent a roll back conflict.  Therefore, there is a much greater chance of locking occurring during a transaction.
Shipping Verification with Billing Selection
In some Elliott installations with shipping verification, especially with users choosing to perform billing selection after shipping verification, we have noticed an increase in CPORDLS table locking conflicts. The main reason behind this is because: 
  • CPORDLS is a small table which means: (1) The table does not have a lot of records; and (2) The record size is small so it translates to more records per data or index page.
  • During the billing selection in shipping verification, Elliott will start a transaction before it begins and end the transaction when it is done with billing selection.  If the user uses serialized items, then Elliott has to write to the CPORDLS table.  Due to the transaction reason, PSQL has to protect the data and index pages that just got updated in CPORDLS by using locks.  
  • If another user is also perform shipping verification and billing selection at the same time on a different order, there's a possibility of a locking conflict happening, and we often see the CPORDLS table show up.
If the second user simply gets the message  "1stuser locked CPORDLS ...." and can wait for the first user to complete the billing selection and end the transaction normally, then this is not a significant issue.  Since most of the transactions from start to end will finish within a second, the chance of conflict is slim. The following is an example of this lock message:



Dead Lock Condition
However, sometimes the locking conflict may result in a dead lock condition like the following:
  • On the first user's screen: "2nduser locked CPORDLS...."
  • On the second user's screen: "1stuser locked CPORDLS...."
While this dead lock situation is in progress, the transaction duration (which normally completes within one second) become a lot longer. 
If you have other users performing shipping verification and billing selection at the same time, you may receive a locking message similar to the one shown above.

This type of dead lock condition can happen in any kind of database.  It can't be resolved until one user is being selected as the victim and terminated.  In Elliott, this can be done by using the PSQL Monitor Utility to close the dead lock victim's user session. The good news is because the user is in the middle of a transaction when termination takes place,  the data integrity remains intact.  But it is a nuisance when this happens.

Rebuild CPORDLS Page Size to 512 Bytes
To reduce the chances of a dead lock conflict with CPORDLS, we suggest that you rebuild the CPORDLS page size to 512 bytes.  With a smaller page size, you have less number of records per data page, and you have less number of indexes per index page.  Thus, the potential locking conflict is reduced.  Since CPORDLS is a small table, the performance impact of using a small page size will be hardly noticed.

To rebuild CPORDLS page size to 512 bytes, you will need to go to your PSQL server and go to Start -> All Programs -> Pervasive -> PSQL 11 -> Utilities -> Rebuild.  Once the Rebuild utility starts up, in the first page add CPORDLS.BTR file into the list.  This file may, for example, have the following path M:\Elliott7\DATA\CPORDLS.BTR.  



Once you have selected the CPORDLS.BTR file, choose "Next."  In the next page, specify the File Format as 9.0 (because 9.5 minimum page size is 1024), and choose Page Size as 512.  Then click "Next" to start the rebuild.



Keep in mind that you can't rebuild this file if your other Elliott users open this file.



Systems Manager

  1. Mapped Drives Disappear After Logoff or Reboot
  2. Using Raw Data Pass Through for Dot Matrix Printer on Windows 10 Does Not Work
  3. How Do I Find The Workstation That's Infected with The Crypto Ransom Ware?
  4. How to Reset the Counter in *.DAT Files After Recovery from Crypto Ransom Ware Attack
  5. Aging Shows Differently After Database Rebuild
  6. What Do I Do When My Anti-virus Software Reports Elliott EXE File as a Virus?
  7. High CPU Usage and Performance Issues After Implementing NTFS Security
  8. "We can't verify who created this file. Are you sure you want to run this file?"
  9. Problem with Printer Configuration If Running Elliott from Multiple Workstations
  10. Inconsistent Elliott Error on Terminal Server
  11. How to Restore Elliott from CryptoWall Ransomware Attack
  12. Clarify Laser Forms Line Item Level Barcode Printing
  13. Is Dot Matrix Printer Still Supported in Elliott with Windows 10?
  14. Should I Install the 32-bit or 64-bit Outlook/Office?
  15. I Receive Error 114 When I Start Up Elliott on the Server
  16. Manage Data Execution Prevention (DEP) Through Registry Editing
  17. Windows Defender May Cause Elliott Start-Up Difficulties
  18. Why Do I Exceed Elliott User License Count When There are No or Very Few Users in Elliott?
  19. What Causes Load Error 198?
  20. How the Windows Scheme You Choose May Affect the Elliott Screen Display
  21. Still Get Error 114 After Adding All Elliott EXE Files to the DEP List
  22. How to Copy Laser Form Templates from Company to Company
  23. Weird Character Displayed for Backslash (\) Character
  24. Does Elliott Support Desktop Virtualization?
  25. Access Is Denied When Launching Elliott V8 Report Viewer
  26. User Cannot See Some Spooled Reports in Elliott V8
  27. Why Does the User List Function Take Forever to Bring Up?
  28. I Am Running Out of Invoice Numbers -- I Need Direction to Archive Invoices
  29. Algorithm to Speed Up eContacts List in Elliott V8
  30. Elliott Requires Volume Supporting 8dot3name
  31. Elliott Running Extremely Slow on Windows 8 with Trend Micro Anti Virus Software Installed
  32. What Causes "File Table Exceed Limit" Error?
  33. Mass Email Time Out
  34. Report Incomplete After 4 Hours: Event Stops Working After Upgrade to Elliott V8
  35. File Created in C:\ Root Directory Disappears
  36. Is There a Way to Create and Distribute Elliott Printer Configurations?
  37. What Are "COBOL Only" or "User Defined" Event Actions? Can We Use Them in Any Way?
  38. How to Purge WSORDHDR.BTR and WSORDLIN.BTR files?
  39. CPORDLS (Order Serial/Lot File) Btrieve Page Size
  40. Create PO Receiving Event to Trap Negative Qty on Hand Problem
  41. Reducing File Sizes for INITLFILE.LOG & SYACTLOG.BTR
  42. Windows 10 and Trend Micro Anti-Virus Software
  43. The Remote Certificate Is Invalid According to the Validation Procedure
  44. Customer Has Multiple Primary Contacts or No Primary Contact
  45. Btrieve Error 46 on S/M Activity Log File
  46. Multi-Currency Workarounds in Elliott
  47. Using the Export Processor to Export Data
  48. Instructions for Importing Laser Form Template
  49. I Am Unable to Post or Enter a Date for the New Year
  50. Does Elliott Work Under Virtualized Desktops Infrastructure (VDI)
  51. Btrieve Error 80 During Defer Processing
  52. Lauch CSV File -- There Was a Problem Sending the Command to the Program
  53. Feature - System Users File Integrity Check
  54. Receive Error in NWSMSCRN for Function Pf-Map-Coordinate-Space
  55. Not Able to Receive Event Emails from Certain Users
  56. Feature - Events for Add Note and Delete Note
  57. When and How to Use DDF2BTR.EXE Utility
  58. Elliott Last Printing Job Overrides Windows Default Printer on Windows 10
  59. Not Able to Change Attributes Added by Other Users
  60. Feature - New Context Menus in v8.0 Spooled Reports Manager
  61. Feature - Automatic Archiving of Spooled Reports in Elliott v8.0
  62. Feature - Enhanced Security for Attributes
  63. Feature - Deferred Processing Multiple Times Per Day
  64. Feature - Ability to Specify User ID in User Search
  65. Feature - Utility to Re-Calculate Item First Received and Last Received Date
  66. NSCTLMN1 Global Setup Time Clock Global Setup
  67. How to Set Up One-to-One Restriction of Customer and Item
  68. Recursion Error When Drill Down to Item File Inquiry
  69. Error Invoking Macro - Cannot Install Hook
  70. Feature - Record Navigation in Attribute Window
  71. Error Connecting VPN from Windows 10 to Windows 2008 Server
  72. How to Stop Users from Sending Elliott Reports through Email
  73. Does Elliott Support Windows 10?
  74. It Is Extremely Slow to Run Elliott over VPN Connection
  75. SYTIMCLK Systems Manager General Time Clock
  76. Feature - Recalculate AP Vendor YTD and Last Year Amount
  77. XCO0100 Systems Manager Design Your Own Order
  78. Feature - Restrict Recurring Event for Number of Times for a Specific Reference
  79. How Do I Limit the Companies for Users?
  80. Feature - Enforced Report Destinations
  81. I Am Unable to Create a New User in Elliott
  82. Feature - PDF Printing in Elliott V8.2
  83. Feature: PDF PostOffice in Elliott V8.2, Introduction
  84. Feature: PDF PostOffice in Elliott V8.2, Part 1
  85. Feature: PDF PostOffice in Elliott V8.2, Part 2
  86. Feature: PDF PostOffice in Elliott V8.2, Part 3
  87. Feature - Added Checkbox and Description to Attribute List and the SPS Commerce Create Attribute Register
  88. Feature - Performance Options for eContact Activity Tab
  89. Feature - Mass Change Salesman Utility
  90. Elliott Installer File-In-Use Warning During Installation
  91. Unable to Run Elliott from UNC Path
  92. V8 Program Desktop Startup Shortcuts - Internal Macro
  93. Event When Order Put On Hold at Invoice Printing
  94. Feature - Time Clock Logoff Type
  95. Feature - Added Distribution to G/L History Files
  96. Feature - Utility to Update eContact PDF PostOffice Flags
  97. Can I Use Elliott for Sales, Telemarketing and CRM Purposes?
  98. Emailing PDF with SSPI Failed After Online Charging Using Credit Card
  99. Can You Explain How Elliott Stores Serial Numbers in Its Database?
  100. Converting Elliott Internal Date to Conventional Date Format in Excel
  101. All of a Sudden, My Terminal Server's Elliott Default Changed to Someone Else's Settings
  102. WannaCry Ransomware Security Recommendation
  103. Symantec Endpoint Protection Versions 12 and 14 Cause Elliott Startup Error
  104. Notes Security - From Global Setup, Note Type to Supervisory Relationship
  105. Remote Desktop Workstation Name
  106. Which Anti-Virus Software Do You Recommend to Installing on the Elliott ERP Server?
  107. Menu Access Error - You Do Not Have Access to CP,INQ, Menu Item 01
  108. Ping Test to Isolate Inconsistent Load Error 198
  109. The Definitions of Extra Flags in System Period Control Setup
  110. How to Use Procdump.exe to Create a Memory Dump for PSQL Engine
  111. Feature - Group Location Security
  112. NSCTLMN4 Global Setup Bill of Lading 1
  113. NSCTLMN4 Global Setup Bill of Lading 2
  114. NSCTLMN4 Global Setup Bill of Lading 3
  115. NSCTLMN4 Global Setup Bill of Lading 4
  116. NSCTLMN4 Global Setup Bill of Lading 5
  117. NSCTLMN4 Global Setup Bill of Lading 6
  118. NSCTLMN4 Global Setup Bill of Lading 7
  119. NSCTLMN4 Global Setup Bill of Lading 8
  120. NSCTLMN4 Global Setup Bill of Lading 9
  121. NSCTLMN4 Global Setup Bill of Lading 10
  122. NSCTLMN4 Global Setup Bill of Lading: Index
  123. Feature - Support 12 Months History in Export Processor
  124. NSCTLMN3 Inventory Management Global Control Setup 1
  125. NSCTLMN3 Inventory Management Global Control Setup 2
  126. NSCTLMN3 Purchase Order Global Control Setup 1
  127. NSCTLMN3 Purchase Order Global Control Setup 2
  128. NSCTLMN3 Bill of Material and Production Order Global Control Setup
  129. NSCTLMN3 Distribution Modules Global Setup: Index
  130. NSCTLMN5 Global Setup Change Quote to Order 1
  131. NSCTLMN5 Global Setup Change Quote to Order 2
  132. NSCTLMN5 Global Setup Change Quote to Order 3
  133. NSCTLMN5 Global Setup Change Quote to Order 4
  134. NSCTLMN5 Global Setup Change Quote to Order 5
  135. NSCTLMN5 Global Setup Change Quote to Order 6
  136. NSCTLMN5 Global Setup Change Quote to Order: Index
  137. I Cannot See the Spooled Reports Even though I Am an Administrator Equivalent User
  138. Multi-Currency Exchange Handling in Elliott
  139. How to be a Good Elliott Citizen
  140. Salesman Security
  141. SYMENU System Manager Introduction 1
  142. SYMENU System Manager Introduction 2
  143. SYMENU System Manager Introduction 3
  144. SYMENU System Manager Introduction 4
  145. SYMENU System Manager Introduction 5
  146. SYMENU System Manager Introduction 6
  147. SYMENU System Manager Introduction 7
  148. SYMENU System Manager - External Macros
  149. SYMENU System Manager - Internal Macros
  150. SYMENU System Manager Introduction 10
  151. Feature - Audit Trail of Accumulator Clearing
  152. SYMENU System Manager Introduction 11
  153. SYMENU System Manager Introduction 12
  154. SYMENU System Manager Introduction 13
  155. SYMENU System Manager Introduction 14
  156. SYMENU System Manager Introduction 15
  157. SYMENU System Manager Introduction 16
  158. SYMENU System Manager Introduction 17
  159. SYMENU System Manager Introduction 18
  160. SYMENU System Manager Introduction 19
  161. SYMENU System Manager Introduction 20
  162. SYMENU System Manager Introduction 21
  163. SYMENU System Manager Introduction 22
  164. SYMENU System Manager Introduction 23
  165. SYMENU System Manager Introduction 24
  166. SYMENU System Manager Introduction 25
  167. SYMENU System Manager Introduction 26
  168. SYMENU System Manager Introduction 27
  169. SYMENU System Manager Introduction 28
  170. SYMENU System Manager Introduction 29
  171. SYMENU System Manager Introduction 30
  172. SYMENU System Manager Introduction 31
  173. SYMENU System Manager Introduction 32
  174. SYMENU System Manager Introduction 33
  175. SYMENU System Manager Introduction 34
  176. SYMENU System Manager Introduction 35
  177. SYMENU System Manager Introduction 36
  178. SYMENU System Manager Introduction 37
  179. SYMENU System Manager Introduction 38
  180. SYMENU System Manager Introduction 39
  181. SYMENU System Manager Introduction 40
  182. SYMENU System Manager Introduction 41
  183. SYMENU System Manager Introduction 42
  184. SYMENU System Manager Introduction 43
  185. SYMENU System Manager Introduction 44
  186. SYMENU System Manager Introduction 45
  187. SYMENU System Manager Introduction 46
  188. SYMENU System Manager Introduction 47
  189. SYMENU System Manager Introduction 48
  190. SYMENU System Manager Introduction 49
  191. SYMENU System Manager Introduction 50
  192. SYMENU System Manager Introduction 51
  193. SYMENU System Manager Introduction 52
  194. SYMENU System Manager Introduction: Index
  195. Elliott V7.0 Release Notes: What's New Since Elliott V6.7
  196. Elliott V7.1 Release Notes: What's New Since Elliott V7.0
  197. Elliott V7.2 Release Notes: What's New Since Elliott V7.1
  198. Elliott V7.3 Release Notes: What's New Since Elliott V7.2
  199. Elliott V8.1 Release Notes: What's New Since Elliott V8.0
  200. Elliott V7.4 Release Notes: What's New Since Elliott V7.3
  201. Elliott V7.5 Release Notes: What's New Since Elliott V7.4
  202. Elliott V8.0 Release Notes: What's New Since Elliott V7.5
  203. Elliott V8.2 Release Notes: What's New Since Elliott V8.1
  204. Drill Down and Receive Message You Do Not Have Access
  205. Problem Running Elliott After Upgrading Windows 10 to Fall Creator Edition
  206. MAPISendMail failed! Not supported [26]
  207. What Information Is Stored in System 12 Months Table (SY12MONS)?
  208. Elliott Telephony Integration - How to Call through My Telephone Set from eContact?
  209. Error Adding Printer Configuration After Latest Windows 10 Update
  210. Anti-Virus Causes PostOffice Emailing Problem
  211. Feature - Equal Sign Support in Export Processor
  212. Running Elliott 8.2 and Up on Windows 2003 Server
  213. How Can I Find Out About New Elliott Events Added or Changed Lately?
  214. Feature - Export Enhanced Attribute Predefined Code Value and Description
  215. Error 114 with GUIUTL32.LBR\GUIUTIL.int in Defer Processing
  216. EL800.EXE - Bad Image - MSVCRT20.dll Is Either Not Designed to Run on Windows or It Contains an Error
  217. Anti-Virus Caused Failure on Crystal Reports ODBC Access
  218. AVIRA Anti Virus Software Kills Elliott EL800 Executable
  219. Error: Trx Date Outside Date Range (00/00/00 - 00/00/00)
  220. How to Allow User to See All Spooled Reports in One Module
  221. A Support Case of Investigating Elliott Database Performance Problem
  222. Received Error in Macro DEALLOC-SHR-MEM Deallocate Failed - Invalid Pointor
  223. Feature - Added the Ability to Purge the System Activity Log

Feedback and Knowledge Base