On 03/28/2015 12:13 AM, Ben Bromhead wrote:
One other thing to keep in mind / check is that doing these tests
locally the cassandra driver will connect using the network stack,
whereas postgres supports local connections over a unix domain socket
(this is also enabled by default).
Unix domain sockets are significantly faster than tcp as you don't have
a network stack to traverse. I think any driver using libpq will attempt
to use the domain socket when connecting locally.
Good catch. I assured that psycopg2 connects through a TCP socket and
the numbers increased by about 20%, but it still is an order of
magnitude faster than Cassandra.
But I'm going to hazard a guess something else is going on with the
Cassandra connection as I'm able to get 0.5ms queries locally and that's
even with trace turned on.
Using python-driver?