When you create a new database file, you can pre-allocate database space using the DATABASE SIZE clause of the CREATE DATABASE statement or by specifying the dbinit -dbs option. See CREATE DATABASE statement, and Initialization utility (dbinit).
As you use the database, SQL Anywhere automatically grows database files as needed. Rapidly-changing database files can lead to excessive file fragmentation on the disk, resulting in potential performance problems. As well, many small allocations are slower than one large allocation. If you are working with a database with a high rate of change, you can pre-allocate disk space for dbspaces or for transaction logs using either Sybase Central or the ALTER DBSPACE statement.
You must have DBA authority to alter the properties of a database file.
Running a disk defragmentation utility after pre-allocating disk space helps ensure that the database file is not fragmented over many disjointed areas of the disk drive. Performance can suffer if there is excessive fragmentation of database files.
Open the Dbspaces folder.
Right-click the dbspace and choose Pre-allocate Space.
Enter the amount of space to add to the dbspace. You can add space in units of pages, bytes, kilobytes (KB), megabytes (MB), gigabytes (GB), or terabytes (TB).
Connect to a database.
Execute an ALTER DBSPACE statement.
Increase the size of the system dbspace by 200 pages.
ALTER DBSPACE system ADD 200;
Increase the size of the system dbspace by 400 megabytes.
ALTER DBSPACE system ADD 400 MB;
|Discuss this page in DocCommentXchange.
Send feedback about this page using email.
|Copyright © 2009, iAnywhere Solutions, Inc. - SQL Anywhere 11.0.1|