List:General Discussion« Previous MessageNext Message »
From:Steven Roussey Date:January 25 2002 3:34am
Subject:Re: Slow updates with two keys in where.
View as plain text  
> Is this just something we have to live with or does 
> MySQL 4 handle this better?

Something to live with. Someday, I'm sure MySQL will optimize this case.
Conceptually its not that hard. You split it into multiple queries that
track an index. If it is a select, you also UNION the results back
together.

However, conceptually easy does not mean trivial. That is a lot of work
for the MySQL team to do and not very high on their list.

Better for you to change: 
  update forum set approved='N' where id=644122 or thread=644122
into 
  update forum set approved='N' where thread=644122
  update forum set approved='N' where id=644122 

Of course, as a (sort-of) competitor, I probably shouldn't say that.

BTW - out of curiosity, what sort of through-put does Phorum have? We
have two machines, one web and one mysql, that handle 100m pv/m, which
ought to hold to 150m/m before we need more hardware.

Sincerely,
Steven Roussey
http://Network54.com/?pp=e 

In honor of Jeremy:
MySQL 3.23.47-log: up 5 days, processed 595,464,211 queries (1,350/sec.
avg)
:)


Thread
Slow updates with two keys in where.Brian Moon24 Jan
RE: Slow updates with two keys in where.Andrew Schmidt24 Jan
  • Re: Slow updates with two keys in where.Brian Moon25 Jan
Re: Slow updates with two keys in where.Steven Roussey25 Jan
  • Re: Slow updates with two keys in where.Jeremy Zawodny25 Jan