On Tue 2002-07-23 at 08:35:29 -0700, gregd@stripped wrote:
> I was wondering if there was anyway for me to speed up my
> update query. I wanted to index the field that i was searching
> for., but i heard that indexing slows down updates or that some
> information might not work...is that true? thanks for any help.
You should index the column if such queries run often or if they do
not, but you really need a speed improvement.
The statement that indexes slow down updates refers to the fact, that
on each update/insert/replace, each index has to be updated. That
means, that an additional index will speed up the update in question
by magnitudes of order, but will slow down all (other) updates a bit
It is a trade-off and the question is simply if you need the speed for
the update in question bad enough. In my personal experience, the
additional disk usage of new indexes was more of a problem than any
speed decrease. YMMV.
> my update statement:
> UPDATE table SET name='NULL' WHERE email='$email'";