[EMAIL PROTECTED] wrote:

> Have seen postings before that count(*) is slower than counting on an
> index.
> 
> However, I am seeing count(*) perform faster than count(id)!!
> 
> Explain for Count(*) is:
> 
> KIOSK  METRICS  METRICS_KIOSKID_EXECTIME_COPIES  INDEX SCAN   
>                                  1206  *
> KIOSK                                                 RESULT 
> IS COPIED   , COSTVALUE IS        1208
> 
> and takes 110 milliseconds.
> 
> Explain for count(id) is:
> 
> KIOSK  METRICS  METRICS_KIOSKID_EXECTIME_COPIES  INDEX SCAN   
>                                  1209  *
> KIOSK                                                 RESULT 
> IS COPIED   , COSTVALUE IS        1211
> 
> and takes approx 4.5 seconds!!!
> 
> Can someone please explain? (no pun intended!)

Because of the same strategy in both cases I assume you 
see caching effects. 
To check this out you have to measure the execution time 
of both statement right after the restart of the db.

Kind regards,
Holger
SAP Labs Berlin

-- 
MaxDB Discussion Mailing List
For list archives: http://lists.mysql.com/maxdb
To unsubscribe:    http://lists.mysql.com/[EMAIL PROTECTED]

Reply via email to