![]() |
Performance Tips and Tricks
|
Reference Manual |
No Longer in the Top Ten, but Worth ListingShut Down the System ProperlyCloudscape features crash recovery that restores the state of committed transactions in the event that the database exits unexpectedly, for example during a power failure. The recovery processing happens the next time the database is started after the unexpected exit. Your application can reduce the amount of work that the database has to do to start up the next time by shutting it down in an orderly fashion. See Shutting Down Cloudscape or an Individual Database in the Cloudscape Developer's Guide. The Cloudscape utilities all perform an "orderly" shutdown. Put Cloudscape First in Your Class PathThe structure of your class path can affect Cloudscape startup time and the time required to load a particular class. The class path is searched linearly, so locate Cloudscape's libraries at the beginning of the class path so that they are found first. If the class path first points to a directory that contains multiple files, booting Cloudscape can be very slow. Increase the Statement Cache SizeCloudscape has a per-connection statement cache that it uses to try to avoid recompiling statements, prepared or not. If the text of an SQL request matches an already compiled statement in the cache, Cloudscape does not need to recompile the statement. If your application compiles exactly the same query more than once, you may want to increase the size of the statement cache to avoid this recompilation. By default, the statement cache size holds 20 statements. You can change this limit with the cloudscape.language.statementCacheSize property. For example: cloudscape.language.statementCacheSize=100 NOTE: For situations in which you compile a prepared statement once and execute it many times, this property does not help performance. It helps only in situations in which you compile exactly the same statement more than once (either executing the same Statement more than once or preparing the same PreparedStatement more than once). If an application's statements are known in advance, it is better programming practice to compile those statements only once. This property is useful for those applications for which the statements are not known in advance. If the user happens to generate the same statement more than once in a session, the application can take advantage of the statement cache. When Working with Development Tools, Pre-Load DatabaseMetaData Stored Prepared StatementsSome GUI Java development tools make heavy use of DatabaseMetaData method calls. Cloudscape can provide stored prepared statements that make these calls run much faster. By default, Cloudscape provides these stored prepared statements dynamically on an as-needed bases. When working with these tools, you should probably just pre-load the database with these stored prepared statements. You do this when creating the database. For information, see cloudscape.jdbc.metadataStoredPreparedStatements in Tuning Cloudscape. |
|
![]() Cloudscape Version 3.6 For information about Cloudscape technical support, go to: www.cloudscape.com/support/.Copyright © 1998, 1999, 2000 Informix Software, Inc. All rights reserved. |