Tip: Check for concurrency issues
Concurrent access of information stored in the database by other transactions is prevented by locks that maintain the reliability of information.
Tip: Identify the cause of slow statements
The statement performance summary feature returns execution times for statements
when troubleshooting slow statement performance. The SQL Anywhere
Profiler uses this feature to display the statement
performance summary results.
Tip: Choose the optimizer goal
You can choose whether to optimize query processing to return the first row quickly, or to minimize the cost of returning the complete result set.
Tip: Update column statistics
To continually improve optimizer performance, the database server automatically updates column statistics during
the processing of any SELECT, INSERT, UPDATE, or DELETE statement.
Tip: Turn off autocommit mode
Instead of running in autocommit mode, consider grouping your SQL statements so each group performs one logical task.
Tip: Use in-memory mode
If your application can tolerate the loss of committed transactions after the most recent checkpoint, then your application may benefit from using in-memory mode.
Tip: Collect statistics on small tables
By default, the database server creates statistics for tables with more than five rows. To create statistics for a table with less than five rows, use the CREATE STATISTICS statement.
Tip: Reduce fragmentation
Fragmentation occurs as you make changes to your database, and performance can suffer if your files, tables, or indexes are excessively fragmented.
Tip: Normalize your table structure
Database tables may contain multiple copies of the same information (for example, a column that is repeated in several tables), and your table may need to be normalized.
Tip: Declare constraints
Declaring primary key and foreign key relationships and their constraints can improve performance.
Tip: Reduce table widths
If you have wide tables, and find performance slow consider further normalizing your tables to reduce the number of columns.
Tip: Replace expensive triggers
Evaluate the use of triggers to see if some of the triggers could be replaced by features available in the database server.
Tip: Use compression carefully
Enabling compression for one connection or all connections, and adjusting the minimum size limit at which packets are compressed can offer significant improvements to performance.