PHP: dba_optimize - Manual

downloads | documentation | faq | getting help | mailing lists | reporting bugs | php.net sites | links | conferences | my php.net

search for in the

dba_popen dba_open

Last updated: Fri, 26 Jan 2007

view this page in

# 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 User Contributed Notes
dba_optimize
doppelbauer at gmail dot com
17-Oct-2006 02:44
`The difference between "dba_optimize" and "dba_sync":
Use "dba_optimize" to optimize a database, which usually consists of eliminating gaps between records created by deletes.
The "dba_sync" function will synchronize the view of the database in memory and its image on the disk. As you insert records, they may be cached in memory by the underlying engine. Other processes reading from the database will not see these new records until synchronization.`
samuele at removethisnorsam dot org
04-Aug-2003 03: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.`
add a note
dba_popen dba_open

Last updated: Fri, 26 Jan 2007
show source | credits | stats | sitemap | contact | advertising | mirror sites
Copyright © 2001-2007 The PHP Group
All rights reserved.
This mirror generously provided by: Yahoo! Inc.
Last updated: Sat Mar 10 09:32:46 2007 PST