Essential Insights into NonStop SQL/MP Basics for Effective Database Management
- Mohan Arun Kumar Bayyavarapu
- May 24
- 3 min read

Managing enterprise-level transaction systems demands a database solution that supports high concurrency, ensures data integrity, and handles large volumes of data efficiently. NonStop SQL/MP, Tandem’s relational database system, meets these needs with a unique set of features designed for mission-critical environments. This post explores the core concepts of SQL/MP, including its access and lock modes, views, indexes, and table auditing options, providing practical insights for database professionals aiming to optimize their systems.
Understanding NonStop SQL/MP and Its Key Features
NonStop SQL/MP is built to support environments where uptime and data accuracy are paramount. It offers:
High concurrency: Multiple users and processes can access and modify data simultaneously without conflicts.
Data integrity: Strong transactional support ensures that data remains consistent even in the event of failures.
Partitioned tables: Large datasets are divided into manageable segments, improving performance and scalability.
These features make SQL/MP a reliable choice for industries like banking, telecommunications, and retail, where transaction volume and accuracy are critical.
Exploring SQL Access Modes
SQL/MP provides three access modes that balance consistency and performance based on application needs:
Browse Mode
This mode allows dirty reads, meaning data can be read without acquiring locks. It offers the highest performance but risks reading uncommitted or inconsistent data. Use cases include reporting or analytics where absolute accuracy is less critical.
Stable Mode
The default mode ensures that data read is committed and stable at the time of access. It balances consistency and performance, making it suitable for most transactional applications.
Repeatable Mode
This mode guarantees high consistency by locking data for the duration of a transaction, preventing other transactions from modifying it. It is ideal for operations requiring strict data accuracy but may reduce concurrency.
Choosing the right access mode depends on the specific requirements of your application. For example, a financial transaction system would benefit from Repeatable mode to avoid errors, while a dashboard displaying near-real-time data might use Browse mode for speed.
Lock Modes and Their Role in Data Consistency
Locks prevent conflicts when multiple transactions access the same data. SQL/MP uses two primary lock modes:
Shared Lock
Allows multiple transactions to read data simultaneously but prevents any from modifying it. This lock supports concurrent reads without risking data changes during the read operation.
Exclusive Lock
Grants a single transaction the right to modify data, blocking others from reading or writing until the lock is released. This lock ensures data integrity during updates.
For example, when updating a customer’s account balance, an exclusive lock prevents other transactions from reading or writing the same record until the update completes. This mechanism avoids inconsistencies such as double spending or lost updates.
The Importance of Views and Indexes in SQL/MP
Views
Views are virtual tables that present data from one or more tables in a customized way without storing the data physically. They simplify complex queries and provide a layer of abstraction for users.
For instance, a view can combine customer information and order history into a single virtual table, making it easier for sales teams to access relevant data without writing complex joins.
Indexes
Indexes improve query performance by allowing faster data retrieval. SQL/MP stores indexes separately from the data tables, enabling quick lookups without scanning entire tables.
Consider a large orders table with millions of records. An index on the order date column allows queries filtering by date to execute much faster, reducing response times significantly.
Audited vs Non-Audited Tables: Choosing Based on Needs
SQL/MP supports two types of tables with different transaction and recovery characteristics:
Audited Tables
These tables are transaction-protected and recoverable. They maintain detailed logs to ensure data can be restored after failures, supporting high reliability. Use audited tables for critical data where loss or corruption is unacceptable.
Non-Audited Tables
These tables offer faster performance by skipping some transaction logging. While they improve speed, they carry a risk of inconsistency if a failure occurs. Use non-audited tables for temporary or less critical data where speed is more important than full recovery.
For example, a session cache might use non-audited tables to maximize speed, while customer account data would reside in audited tables to guarantee durability.
Practical Tips for Managing SQL/MP Databases
Monitor lock contention to avoid performance bottlenecks. Excessive exclusive locks can reduce concurrency.
Use partitioned tables to handle large datasets efficiently. Partitioning can improve query speed and simplify maintenance.
Design views carefully to avoid unnecessary complexity that can slow down queries.
Regularly update indexes to maintain query performance, especially after large data modifications.
Choose table auditing based on data criticality to balance performance and reliability.



Comments