英文:
Slow uploads to bigQuery using golang client
问题
我正在使用已弃用的BigQuery Golang库。
最近上传速度变得很慢。我想知道是否将客户端更新到新的库会提高性能。我在文档中找不到任何关于性能改进的信息。
我目前正在使用的旧的已弃用库:
https://github.com/googleapis/google-api-go-client/tree/main/bigquery/v2
新的客户端:
https://github.com/googleapis/google-cloud-go/tree/main/bigquery
使用新的库是否可以期望获得性能改进?
英文:
I am using deprecated BigQuery Golang library.
Lately uploads became much slower. I wonder if updating the client to a new library will make a performance improvement. I couldn't find in the documentation anything saying about performance improvement.
Old deprecated library I am currently using:
https://github.com/googleapis/google-api-go-client/tree/main/bigquery/v2
New client:
https://github.com/googleapis/google-cloud-go/tree/main/bigquery
Should I expect to get performance improvement with the new library?
答案1
得分: 1
cloud.google.com/go/bigquery
包在底层使用google-api-go-client
的bigquery包。我不会期望在网络吞吐量方面有所改进,但由于云包在低级API管理方面做了更多工作,你可能会看到一些改进。
要真正回答这个问题,你需要详细说明你正在做什么,并尝试更详细地量化细节:你是将字节发送到GCS,然后构建一个加载作业吗?还是将内联上传作为加载作业发送?还是流式传输数据?
英文:
The cloud.google.com/go/bigquery
package uses the google-api-go-client
bigquery package under the hood. I wouldn't expect an improvement in raw network throughput from the switch, but you might see improvements due to how the cloud package does more of the low level API management for you.
To really answer the question, you'd need to be able to detail what you're doing and try to quantify the details a bit more: are you sending bytes to GCS, and then constructing a load job? Sending an inline upload as a load job? Streaming data?
通过集体智慧和协作来改善编程学习和解决问题的方式。致力于成为全球开发者共同参与的知识库,让每个人都能够通过互相帮助和分享经验来进步。
评论