List:General Discussion« Previous MessageNext Message »
From:Dan Nelson Date:July 23 2002 8:13pm
Subject:Re: faster update
View as plain text  
In the last episode (Jul 23), Greg D. said:
> 	 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 that true? thanks for any help.
> my update statement:
> UPDATE table SET name='NULL' WHERE email='$email'";

Everything's a tradeoff.  Indexes slow down inserts and updates because
the index must be maintained, but the advantage of being able to
directly access particular records with them instead of doing a full
table scan more than offsets it.  Add an index on email and be happy.

	Dan Nelson
faster updateGreg D .23 Jul
  • Re: faster updateBenjamin Pflugmann23 Jul
  • Re: faster updateDan Nelson23 Jul