Re: ranking album plays by city, help me beat Oracle

2001-02-22 Thread Benjamin Pflugmann
Hello. On Tue, Feb 20, 2001 at 03:27:08PM -0800, [EMAIL PROTECTED] wrote: Huh? You got it 7 times faster by only extracting that query from the for loop and changing it to a group by? Or did you do anything else? Sorry there were some other unnecessary queries that were mistakenly in the

Re: ranking album plays by city, help me beat Oracle

2001-02-21 Thread Benjamin Pflugmann
Hi. On Wed, Feb 21, 2001 at 12:32:21PM -0800, [EMAIL PROTECTED] wrote: I will respond in more detail later but just quickly now : Hm. Sorry, I don't understand your argument. By the for loop, your query does the same, doesn't it (selecting the rank of one album in each metro is the

Re: ranking album plays by city, help me beat Oracle

2001-02-20 Thread S A
Huh? You got it 7 times faster by only extracting that query from the for loop and changing it to a group by? Or did you do anything else? Sorry there were some other unnecessary queries that were mistakenly in the measurement.. Here is the missing EXPLAIN. mysql EXPLAIN SELECT

Re: ranking album plays by city, help me beat Oracle

2001-02-17 Thread Benjamin Pflugmann
Hello. On Fri, Feb 16, 2001 at 03:58:20PM -0800, [EMAIL PROTECTED] wrote: This is the latest approach we're using now. It turns out that the query to get Total Plays for an Album per City can be taken out of the City for loop done only once as a GROUP BY. The worst case time for MySQL is

Re: ranking album plays by city, help me beat Oracle

2001-02-16 Thread S A
This is the latest approach we're using now. It turns out that the query to get Total Plays for an Album per City can be taken out of the City for loop done only once as a GROUP BY. The worst case time for MySQL is now 16 seconds compared to Oracle's 8 seconds. On most cases MySQL is now

Re: ranking album plays by city, help me beat Oracle

2001-02-15 Thread Benjamin Pflugmann
Hi. Could you please post the result of "EXPLAIN" for both queries and "SHOW INDEX FROM album_by_city". And, for how much cities does this gets executed? Additionally, I would be interested, if you used the same method with Oracle or another. If so, would you please post it, too. Bye,

Re: ranking album plays by city, help me beat Oracle

2001-02-15 Thread S A
Could you please post the result of "EXPLAIN" for both queries and "SHOW INDEX FROM album_by_city". I haven't used EXPLAIN before. There are indexes on each column. And, for how much cities does this gets executed? There are about 100 cities or regions that are used for ranking.

Re: ranking album plays by city, help me beat Oracle

2001-02-15 Thread Benjamin Pflugmann
Hi. On Thu, Feb 15, 2001 at 09:25:56PM -0800, [EMAIL PROTECTED] wrote: Could you please post the result of "EXPLAIN" for both queries and "SHOW INDEX FROM album_by_city". I haven't used EXPLAIN before. Just put it before the SELECT in your query. I don't know whether this will work