-
Notifications
You must be signed in to change notification settings - Fork 51
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Large select queries running 5-10x slower than with psql #259
Comments
As a more fair comparison, I ran the same query with python's psycopg2 |
Are you on the latest version of LibPQ.jl? 1.14 introduced some significant performance improvements. Are you measuring parse time or just transit time (i.e. time for |
|
On the transit time, it would be helpful for replication to have a sense of the schema being pulled. Can this be replicated by pulling 10 million rows of a single Are your connections using SSL? |
Ah you're right, after making a minimal example locally on my laptop and testing more carefully, nearly all the time is taken up by But while it's true that For example:
(everything was already run once to compile) Also, it seems like |
Ah nevermind, I forgot to set I also noticed that it's much (orders of magnitude) faster to to |
This is a really good catch, we should be able to make a change to get Tables to do that automatically. |
I realize this report is vague, but I'm curious whether this performance is to be expected with LibPQ.jl and whether there's any low hanging fruit that get the performance closer to that of psql.
I'm running a simple select query that returns 10-100 million records with 3 non-null
Float64
values. When I run the query over a not-so-fast wifi connection, psql consistently returns the results 10x faster than with LibPQ.jl (CPU usage is low). When I run the query over a 10 Gbit LAN connection, psql is consistently 5x faster (CPU usage is maxed out).binary_format=true
andnot_null=true
didn't make a significant difference.The text was updated successfully, but these errors were encountered: