dream0776 2013-11-08 04:12
浏览 85

有没有办法解决最初的Go / Golang FreeTDS + ODBC调用缓慢的问题?

I'm using the ODBC driver with FreeTDS by Brainman (http://code.google.com/p/odbc), and I'm noticing that my initial DB stored procedure call is slow, and the other ones are as fast.

Here are the results of a test:

=== RUN TestLoadElitePartner
ELAPSED TrafficCheck:  456.0261ms
ELAPSED LoadEliteInfo:  123.0071ms
ELAPSED LiveFeed:  128.0073ms
--- PASS: TestLoadElitePartner (0.71 seconds)
PASS

The first call is 456ms, and the subsequent calls are more realistic, at ~125ish each, but still a bit slow. If I SWAP the order that these three db queries are called, the first one is always slow (~450ms) and the subsequent ones faster (~125ms), assumedly due to connection pooling.

Is there a way to FIX the initial call being THAT slow? 450ms does not seem reasonable to me.

My DB connection string is directly to an IP address, so this is not a DNS issue. I've read on http://freetds.schemamania.org/userguide/seemtooslow.htm that DNS and logging are the main issues that FreeTDS can be slow, but I do not have logging enabled and I am going directly off IP. Is there anything else I can do to optimize my ODBC/FreeTDS?

  • 写回答

0条回答 默认 最新

    报告相同问题?

    悬赏问题

    • ¥15 虚幻5 UE美术毛发渲染
    • ¥15 CVRP 图论 物流运输优化
    • ¥15 Tableau online 嵌入ppt失败
    • ¥100 支付宝网页转账系统不识别账号
    • ¥15 基于单片机的靶位控制系统
    • ¥15 真我手机蓝牙传输进度消息被关闭了,怎么打开?(关键词-消息通知)
    • ¥15 装 pytorch 的时候出了好多问题,遇到这种情况怎么处理?
    • ¥20 IOS游览器某宝手机网页版自动立即购买JavaScript脚本
    • ¥15 手机接入宽带网线,如何释放宽带全部速度
    • ¥30 关于#r语言#的问题:如何对R语言中mfgarch包中构建的garch-midas模型进行样本内长期波动率预测和样本外长期波动率预测