What do you think about DB explorer performance

alnux
Member | 139
+
0
-

hi ,
I would like an opinion of the following, in my models I want to use a general query of a table x, and from the result inside the Selection object make the subqueries by example

	public function TotalAll() {
		return  $this->db->table($this->table);
	}

and from that result obtain just actived rows

	public function all(){
		return $this->TotalAll()->where('status = ?',self::ACTIVE);
	}

My question is if it is better to only obtain the ACTIVE wanted by making a direct query to the database or is it the same in performance by making the subquery… becouse Selection class allow it

thanks

David Grudl
Nette Core | 8228
+
+2
-

There is no difference in DB performance.