/    Sign up×
Community /Pin to ProfileBookmark

mysql/php speed ?

Hi, I have a question about speed : is faster to search mysql via php with several conditions to limit the number of items found or to search with fewer conditions to limit processing time ?

thansk for your help !

to post a comment
PHP

1 Comments(s)

Copy linkTweet thisAlerts:
@NogDogSep 20.2007 — In most cases, I would say that a complete, properly constructed query against data with appropriate indexes will execute faster than a general query that returns a data set which then requires further filtering by your script. (A DBMS is specifically designed to organize and sort data, after all.) However, the only way to be 100% positive is to test both methods in a controlled environment that emulates the production environment as closely as possilbe, then measure and compare response times.
×

Success!

Help @patimages spread the word by sharing this article on Twitter...

Tweet This
Sign in
Forgot password?
Sign in with TwitchSign in with GithubCreate Account
about: ({
version: 0.1.9 BETA 5.16,
whats_new: community page,
up_next: more Davinci•003 tasks,
coming_soon: events calendar,
social: @webDeveloperHQ
});

legal: ({
terms: of use,
privacy: policy
});
changelog: (
version: 0.1.9,
notes: added community page

version: 0.1.8,
notes: added Davinci•003

version: 0.1.7,
notes: upvote answers to bounties

version: 0.1.6,
notes: article editor refresh
)...
recent_tips: (
tipper: @AriseFacilitySolutions09,
tipped: article
amount: 1000 SATS,

tipper: @Yussuf4331,
tipped: article
amount: 1000 SATS,

tipper: @darkwebsites540,
tipped: article
amount: 10 SATS,
)...