joshelser commented on pull request #60:
URL:
https://github.com/apache/phoenix-queryserver/pull/60#issuecomment-833644505
```
start = time.perf_counter_ns()
iterations = 500
# each connection results in a new Session
with db.connect() as conn:
for x in range(1, iterations):
with conn.cursor() as cursor:
cursor.execute("SELECT count(1) FROM employees limit 10")
row=cursor.fetchone()
if x % 100 == 0:
print("Iteration %d done" % (x))
end = time.perf_counter_ns()
print("Read {} rows, Total execution time {}
milliseconds".format(iterations, (end - start) / 1000 / 1000))
```
Using this and going directly against PQS without and with this change does
show some interesting results!
The query here is running `SELECT count(1) from EMPLOYEES` which has 50k
rows in it. Small data size, fully cached in HBase, trying to eliminate any
latency from reading the data itself.
After warming up the JVM, I ran 3 executions with and without this change
and averaged the results. Without this change, average execution time was
36673ms. With this change, the execution time was 31799ms. That's about a 15%
performance improvement!
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]