خرید بک لینک

Vote count: -1

What is more efficient for finding and matching data values - querying all of the data in a table and iterating over it using a loop, for example:

var rows = database.query("SELECT * FROM table");
for (var i = 0; i < rows.length; i++) {   
     if (rows[i].column == "value") {
         console.log("value found");
     }
}

or using the WHERE clause:

SELECT * FROM table WHERE column='value'

I am conceed that the iteration method might take longer than using the WHERE clause - am I correct?

asked 2 mins ago

- - , .

برچسب: نویسنده: استخدام کار تاريخ: شنبه 1 اسفند 1394 ساعت: 0:07

صفحه بندی