Changing the query that contains
(`hometeam` = $this->teamid OR `awayteam` = $this->teamid)
To one without the OR makes that query go from 0.5-1.1 seconds to <0.002 seconds each. *20,000 occurances (or more) is a huge time delta.
See http://dba.stackexchange.com/questions/45219/how-can-i-speed-up-this-slow-simple-query https://dba.stackexchange.com/questions/45219/how-can-i-speed-up-this-slow-simple-query
Changing the query that contains
(`hometeam` = $this->teamid OR `awayteam` = $this->teamid)
To one without the OR makes that query go from 0.5-1.1 seconds to <0.002 seconds each. *20,000 occurances (or more) is a huge time delta.
See http://dba.stackexchange.com/questions/45219/how-can-i-speed-up-this-slow-simple-query
Changing the query that contains
(`hometeam` = $this->teamid OR `awayteam` = $this->teamid)
To one without the OR makes that query go from 0.5-1.1 seconds to <0.002 seconds each. *20,000 occurances (or more) is a huge time delta.
See https://dba.stackexchange.com/questions/45219/how-can-i-speed-up-this-slow-simple-query
Changing the query that contains
(`hometeam` = $this->teamid OR `awayteam` = $this->teamid)
To one without the OR makes that query go from 0.5-1.1 seconds to <0.002 seconds each. *20,000 occurances (or more) is a huge time delta.
See http://dba.stackexchange.com/questions/45219/how-can-i-speed-up-this-slow-simple-query