db-derby-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Apache Wiki <wikidi...@apache.org>
Subject [Db-derby Wiki] Update of "InMemoryBackEndPrimer" by SergeyVladimirov
Date Thu, 10 Mar 2011 00:58:36 GMT
Dear Wiki user,

You have subscribed to a wiki page or wiki category on "Db-derby Wiki" for change notification.

The "InMemoryBackEndPrimer" page has been changed by SergeyVladimirov.
The comment on this change is: Proper mechanisms to delete an in-memory database.
http://wiki.apache.org/db-derby/InMemoryBackEndPrimer?action=diff&rev1=10&rev2=11

--------------------------------------------------

  
  
  == How to delete an in-memory database ==
- A proper mechanism to delete an in-memory database has not yet been added.
+ Proper mechanisms to delete an in-memory database are:
- The user is left with two choices:
-   * restart the Java VM
-   * use the static method ''``VFMemoryStorageFactory.purgeDatabase(String)''.
  
- The latter mechanism isn't part of Derby's published API (it is not documented), and will
most likely be removed in the next version of Derby. '''Use it at your own risk'''. To purge
the database from memory this way, do the following:
+  * restart the Java VM,
+  * drop database using connection ";drop=true" attribute.
  
-   * shutdown the database
+ Also there is inproper way to delete in-memory database, but it shall be considered "unsafe",
may stop working anytime, and will most likely be removed in the next version of Derby. '''Use
it at your own risk'''.
-   * then invoke ''``VFMemoryStorageFactory.purgeDatabase( (new java.io.File( dbName )).getCanonicalPath()
)''.
+   * shutdown the database and invoke ''``VFMemoryStorageFactory.purgeDatabase( (new java.io.File(
dbName )).getCanonicalPath() )''.
  
  '''NOTE''': Depending on the value of ''derby.system.home'', the current working directory
and whether an absolute path is being used, you may have to do ''new java.io.File(System.getProperty("derby.system.home",
"."), dbName)'' (remember to get the canonical path in this case as well).
- 
- 
- <<BR>>
- See also under the heading ''Future features''.
  
  == Configuration and tuning ==
  The most important aspect to configure, is the size of the Java heap. When using the in-memory
storage back end, the memory requirement should be similar to the memory requirements of using
the disk-based storage back end plus the size of the user data. The general overhead will
be increased somewhat.

Mime
View raw message