Re: Optimizing a Table with PHP
| From: | Benjamin Pflugmann | Date: | Thu, 27 Sep 2001 13:29:33 +0000 |
| Subject: | Re: Optimizing a Table with PHP | ||
| References: | 1 2 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-69016@lists.php.net to get a copy of this message | ||
Hi.
There is something strange going on. It's normal that deleting rows
doesn't make the file smaller, but this space should be reused later
on. Well, additionally this may depend somewhat on the table type
which you did not mention.
You could try OPTIMIZE TABLE before you start adding new rows again.
Bye,
Benjamin.
PS: Btw, this has nothing to do with PHP at all, so to say "you have
told PHP" isn't quite right. You told MySQL. If you are not sure if
something is a PHP or MySQL problem, you should try the commands in
the MySQL command line client to compare, before posting.
On Thu, Sep 27, 2001 at 10:52:52PM +1000, chris@ideal.net.au wrote:
>
> Im trying to do someting and im not finding much help out there on the web
> so im asking here if anyone has any pointers.....
>
> I have a MySQL database table full of like 12000 records on a FreeBSD box
> with apache/php4. and what I have is a script that when I run it, it
> deletes all records, and rebuilds this table with the updated 12000
> records.
>
> But what happens, it keeps the size of the table huge, and only adds to
> it.
>
> Is there some way that after ive told PHP to delete all records, to
> optimize the table before writing all the new records ?
>
[...]
--
benjamin-mysql@pflugmann.de