Jun 1, 2006 #1 altendew Programmer Joined Mar 29, 2005 Messages 154 Location US Hi I currently have this query.. Code: SELECT sum( burst ) AS sum, sum( worth ) AS sum2 FROM 3279655_spends WHERE donation = '0' It will run for 14-15 seconds at a time. I am running MySQL 4.1 Is there any way to make this query not go so slow.
Hi I currently have this query.. Code: SELECT sum( burst ) AS sum, sum( worth ) AS sum2 FROM 3279655_spends WHERE donation = '0' It will run for 14-15 seconds at a time. I am running MySQL 4.1 Is there any way to make this query not go so slow.
Jun 2, 2006 #2 Kozusnik Programmer Joined Feb 27, 2005 Messages 620 Index the table by "donation". Mark Upvote 0 Downvote
Jun 4, 2006 Thread starter #3 altendew Programmer Joined Mar 29, 2005 Messages 154 Location US I have it indexed as donation,id.. does having the id also ammended to it.. make it slower? Upvote 0 Downvote
Jun 4, 2006 Thread starter #4 altendew Programmer Joined Mar 29, 2005 Messages 154 Location US I had the index set to JUST donation before.. and it never relly add a problem. Then I added the row id.. and the problem started. I dont understand why adding 1 column to an index would make it slower? Upvote 0 Downvote
I had the index set to JUST donation before.. and it never relly add a problem. Then I added the row id.. and the problem started. I dont understand why adding 1 column to an index would make it slower?