Thread
:
php count() or sql count(*) is faster??
View Single Post
#
2
(
permalink
)
03-24-2008, 03:37 PM
xentek
Senior Member
Join Date: Feb 2008
Posts: 112
MySQL count is probably faster, but not on star. Do it on your primary key field, and it should be faster.
Also, don't call either again and again - set the result to a variable and reference that. Especially in a loop.
__________________
-
xentek
xentek
View Public Profile
Send a private message to xentek
Find all posts by xentek