Re: OT - database and indexes... but anyone please?
| From: | Rory McKinley | Date: | Mon, 26 Sep 2005 07:34:37 +0000 |
| Subject: | Re: OT - database and indexes... but anyone please? | ||
| References: | 1 2 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-223161@lists.php.net to get a copy of this message | ||
Rory Browne wrote:
<snip>deleting an index(a good index that
> is) would slow the db down in certain cases. Deleting a "bad index"
> would speed certain operations up.
<snip>
If the index in question happens to be a unique index or a primary key
(really just a special case of index) - you could be breaking the logic
of the table (allowing duplicates where there should be none).
Pretty much as Rory (the other one) said: An index makes write
operations slower and read operations faster. When you are doing bulk
inserts to a table it is often a good idea to drop any index , populate
the table and then re-index (for performance reasons).
Regards
Rory