dba_optimize

(PHP 3 >= 3.0.8, PHP 4, PHP 5)

dba_optimize -- Optimize database

说明

bool dba_optimize ( resource handle )

dba_optimize() optimizes the underlying database.

参数

handle

The database handler, returned by dba_open() or dba_popen().

返回值

如果成功则返回 TRUE,失败则返回 FALSE

参见

dba_sync()


add a note add a note User Contributed Notes
samuele at removethisnorsam dot org
04-Aug-2003 06:00
Note that the internal structure of each DB that needs to access etherogeneous data in a *fast* way it is not necessarily space-optimized. So, if you add-remove-substitute keys with data having different content length, the db continues to grow, wasting space. So, it is necessary, sometimes, to re-pack the db in order to remove unused data from the db itself. But it is important to remind that, even if the file grows, the data remain optimized and - obviously - the access continues to be fast. Further information are available at dba_replace() user-contributed notes.