Im using latest phalcon 3.2.0 on php 7.0 with nginx and php opcache enabled this basic raw query code and I am only getting around 15 req per second on ab benchmark
$sql = "SELECT * FROM table WHERE field = 'something here' ORDER BY product_id DESC LIMIT 12 OFFSET 0"; $di = $this->DI; $db = $di['db']; $data = $db->query($sql); $result = $data->setFetchMode(\Phalcon\Db::FETCH_OBJ); $results = $data->fetchAll(); return $results;
While on my python flask program running on the same vagrant machine(ubuntu/trusy32) and same query using gunicorn and nginx I am getting around 1300 req per second.
my computer is windows 7 running on intel i7 7700 with 8gb of ram.
I thought phalcon would be faster, is there something that I should do? thanks