Re:Efficient GraphQL Queries in Ruby on Rails and Postgres
by jblwps on Wednesday September 25, 2019 @09:42PM
(#21077386)
Is the concern over repeated information about [load on the DB], [size of data sent to the client], or something like [processing requirements on the client]? I'm assuming you're talking about [size of data sent to the client], but shouldn't that data be readily-compressible?
[ Parent
| on HN ]
Re:Efficient GraphQL Queries in Ruby on Rails and Postgres
by uhoh-itsmaciek on Thursday September 26, 2019 @12:52AM
(#21078280)
I mostly meant data size on the wire, yeah, but these are all potential issues. In any case, the performance difference between the two approaches is going to heavily depend on your schema and your data, and I suspect the AR works well enough in practice.
And in this example, the data is definitely compressible, but the Postgres wire protocol does not implement compression (it leaves that to tls right now, though CRIME makes that a problem). Adding native compression to the protocol has been on the TODO list for a while: https://wiki.postgresql.org/wiki/Todo#Wire_Protocol_Changes_...