-
Notifications
You must be signed in to change notification settings - Fork 303
Documentation for copy from/to #230
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
Comments
I can see, but we started developing our own postgres client. Features of our client
By the way, thanks to the second point, in the benchmark our results are better by about 2x ) |
Ah interesting. Anything you're gonna share at some point? Always interesting to see other takes at something like this.
|
|
|
Just the |
Yes, it will not work to give up the text format, there are data types that do not have a binary format. |
Everything looks good from here, but if you can repro, be sure to let me know! If you're seeing 2x improvement compared to Postgres.Js I'd love to know! Right, I thought there was some downside which kept me from diving deeper back then. I suppose it could be neat as opt in for those cases where the types work and the performance benefit is worth it. |
Strange, because that was the only explanation for such a difference in our speed. |
Hello @porsager, I published the alpha version of my postgres client I wrote a benchmark script, it utilizes the processor by 100%, the number of RPS is displayed in the console.
To start your client, you need to pass a parameter
It will show the number of RPS of your client, the difference is more than 2x. There is also a test script, binary encoding/decoding parameters, you may be interested.
|
Hey @uasan .. That's awesome! Good job! I see a 35% improvement and not 100% as you mention when I activate prepared statements for unsafe (you need to pass That's still really cool though — I suppose it's due to using the |
Ok, I didn't know )
The binary protocol gives acceleration on large responses, in this benchmark there is a very small response size, so I think the difference is due to more optimal I/O and reuse buffers. |
If |
You're right, it's not because of binary. I dug a bit deeper yesterday, and I actually found 2 things that I was doing wrong. The first was that I sent flush before sync after execute. Simply fixing that gave about 15%. It's gonna be nice to get these fixes in, so thanks a lot for bringing this to my attention! |
If anyone would like to contribute some documentation for the copy from/to streams features added, I'd be very grateful.
Maybe you wanna take a look at it @uasan ?
The text was updated successfully, but these errors were encountered: