5 ms·
His measurement is around this line: users = list(User.objects.all()) That will include Postgres' work, the Python Postgres driver's work, and the ORM's w
by bhauer 13y ago
His measurement is around this line:
users = list(User.objects.all())
That will include Postgres' work, the Python Postgres driver's work, and the ORM's work. Elsewhere, we've already seen that Postgres and MySQL can provide a response to such a trivial query over Ethernet in less than 5ms, under heavy concurrent load, on commodity hardware. But his measurement is 90ms.
For the sake of argument, let's say that hardware variations mean his local Postgres instance (that is, an instance without Ethernet latency to contend with) requires 20ms to fulfill the query. Maybe his laptop is from 2006. That still leaves 70ms unaccounted for.
It's not Postgres' fault.