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?
