Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Best way to index this query.

Status
Not open for further replies.

altendew

Programmer
Mar 29, 2005
154
US
Hi I currently have this query.

Code:
SELECT sum( worth ),sum( burst ) 
FROM 3280266_spends
WHERE donation = '0'

This sometimes runs through 70,000 rows.. what would be the best way to index this?
 
Here is the solution

Code:
ALTER TABLE 324632_spends ADD INDEX ( `donation` , `worth` , `burst` )
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top