Hi
i'm new to phalcon and i really like it. I just did a simple compare beetwen phql and pdo. I have a simple table named user with 4 columns and 10K rows.
using pdo
$t = microtime(true);
$db = new PDO('mysql:host=localhost;dbname=phalcon;charset=utf8', 'root', 'dbpass');
$stm = $db->query("SELECT * FROM user");
$rows = $stm->fetchAll(PDO::FETCH_ASSOC);
echo microtime(true) - $t;
echo '<br/>';
echo memory_get_usage(true);
and result
0.083003997802734
7602176
using phalcon
$t = microtime(true);
$builder = $this->modelsManager->createBuilder();
$users = $builder->from('user')->->getQuery()->execute();
echo microtime(true) - $t;
echo '<br/>';
echo memory_get_usage(true);
and result
0.069004058837891
2097152
Amazingly both proccess time and memory usage in phalcon is lower than pdo. As I know phalcon use pdo at the backend and returns model classes instead of pure array. How come that is possible?