[英]Snowflake: same queries taking more time although using Result Cache
I'm new to snowflake, Using JdbcTemplate for executing queries.我是雪花的新手,使用 JdbcTemplate 执行查询。
BasicDataSource dataSource = new BasicDataSource();
dataSource.setUrl("jdbcUrl");
dataSource.setDriverClassName(SNOWFLAKE_DRIVER_NAME);
dataSource.addConnectionProperty(CLIENT_SESSION_KEEP_ALIVE, "true");
JdbcTemplate jdbcTemplate = new JdbcTemplate(dataSource);
Facing below issue on Snowflake:在雪花上面临以下问题:
If I execute the same query multiple times, and gap between the same two queries <= 150 seconds , then it takes around 300ms .如果我多次执行相同的查询,并且相同的两个查询之间的间隔 <= 150 seconds ,则大约需要300ms 。 If the gap between the same two queries > 150 seconds , then it takes around 1200ms .如果相同的两个查询之间的间隔 > 150 秒,则大约需要1200毫秒。 These timings are from java code.这些时序来自 java 代码。 Although all queries are using a Result cache because I'm executing the same queries multiple times.尽管所有查询都使用结果缓存,因为我多次执行相同的查询。
Anyone have an idea, why is this latency is occurring if the gap between the same two queries is over 150 seconds?任何人都有一个想法,如果相同的两个查询之间的间隔超过 150 秒,为什么会出现这种延迟?
At Snowflake side, the AWS load balancer has 150 seconds timeout configured on it.在 Snowflake 端,AWS 负载均衡器配置了 150 秒超时。
Network sockets are getting closed after 150 seconds of inactivity.网络 sockets 在 150 秒不活动后将关闭。 This is why all subsequent communication attempts have to re-initialize the connection.这就是为什么所有后续的通信尝试都必须重新初始化连接。 That's why latency is occurring这就是发生延迟的原因
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.