x,y are both column of Table "aa", they may have random value . 

And you think that will affect the performance.? 

What I think is Sqlite will first use "where cluase" to get limited value ,then 
use "group by" in the same . 

so , the perfomance depend "where" clause , correct? 



Igor Tandetnik <[EMAIL PROTECTED]> 写道: Bo Lin  wrote:
> I just found a strange case , can you give me some explaination ?
> 
> The Sql looks like
>    select x, y, sum(z)/1000 as bw from aa where
>        a=1 and b=1 and
>       c =1 and d= 6 group by x, y having count(*) > 1 order by       
>       bw desc limit 10
> 
> Column "d" is all set to 6
> 1/3 of total  record is (a=1,b=1,c=1)
> 1/3 of total  record is (a=2,b=2,c=2)
> 1/3 of total  record is (a=3,b=3,c=3)

Where do x and y come from, what are their values?

Igor Tandetnik



__________________________________________________
赶快注册雅虎超大容量免费邮箱?
http://cn.mail.yahoo.com

Reply via email to