dba_delete() problems
| From: | Steve Gerhardt | Date: | Sun, 02 Jun 2002 08:06:31 +0000 |
| Subject: | dba_delete() problems | ||
| Groups: | php.db | ||
| Request: | Send a blank email to php-db+get-19573@lists.php.net to get a copy of this message | ||
Hello all,
I've got a bit of a problem at the moment. I'm using the dba_ functions to
do some simple database access, and I have the need to delete some items
from the database from time to time. When dba_delete() is called, it returns
true, indicating that the key/value pair was deleted. After making the
deletions, dba_sync() is called. The problem is, the database size never
decreases no matter how much you delete (even if you remove every item). On
examination of the .dbm files in text editor, I found that all the data from
every key/value pair was still there, and hadn't been removed as I wanted it
to. This is extremely bad for the database, because it grows constantly with
no way to decrease the size other than flat out deleting it, which I don't
want to do. Am I doing something wrong with deleting the keys, or is this an
issue with dba?
Notes: I'm using Apache 1.3.24 and PHP 4.2.1 on Windows XP Professional. The
database is accessed using the db3 handler.
Thank you in advance for any replies,
Steve