Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Why SELECT * faster than COUNT(*) in network?
Message
 
To
07/12/2000 06:24:39
General information
Forum:
Visual Basic
Category:
Database DAO/RDO/ODBC/ADO
Miscellaneous
Thread ID:
00450286
Message ID:
00450306
Views:
29
>Hi,
> Why SELECT * faster than COUNT(*) in network? I have a simple test as below:
>
>FOR i =1 to 500
> set rs = db.openrecordset('select * from mytabledbopensnapshot )
> rs.close
>NEXT i
>
>it use 6 secs to finish.
>
>However, if i use count(*)
>
>FOR i =1 to 500
> set rs = db.openrecordset('select count(*) from mytable',dbopensnapshot)
> rs.close
>NEXT i
>
>it take 57 secs. why?
>
>Thank you

On which database engine?
Éric Moreau, MCPD, Visual Developer - Visual Basic MVP
Conseiller Principal / Senior Consultant
Moer inc.
http://www.emoreau.com
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform