something like O(n) thingy.

Not for 'how-to' coding questions but PHP theory instead, this forum is here for those of us who wish to learn about design aspects of programming with PHP.

Moderator: General Moderators

Post Reply
koguee
Forum Newbie
Posts: 18
Joined: Thu Aug 14, 2008 5:13 am
Location: Philippines
Contact:

something like O(n) thingy.

Post by koguee »

Concerning the time a query is being evaluated, I wonder if I do a query on a table with very large number of rows, does php traverse all those rows to find the answer to match the query? Is it alright to do that or other faster ways to do that?
User avatar
sergio-pro
Forum Commoner
Posts: 88
Joined: Sat Dec 27, 2008 12:26 pm

Re: something like O(n) thingy.

Post by sergio-pro »

You question is incomplete.

In general, if you are making a right query, all the job makes the DBMS - which is faster than PHP,
If the table is indexed - it will be more faster.
josh
DevNet Master
Posts: 4872
Joined: Wed Feb 11, 2004 3:23 pm
Location: Palm beach, Florida

Re: something like O(n) thingy.

Post by josh »

Its called O notation, and if you're concerned about speed create an index.
Post Reply