简体   繁体   English

雪花:虽然使用结果缓存,但相同的查询需要更多时间

[英]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.

相关问题 使用 maven 确保测试花费的时间超过指定的超时时间 - Tests taking more time than specified timeout using maven surefire 两种方法实现相同的算法,一种在java中比其他方法花费更多的运行时间 - Two methods implement same algorithm one is taking running time more than other in java 在Struts 2的同一操作方法中使用多个结果类型? - Using more than one result type in the same action method in struts 2? ExecutorService.submit( <callable> )花更多的时间? - ExecutorService.submit(<callable>) taking more time? Neo4j插入需要更多时间 - Neo4j Insertion taking more time 在 Swagger UI 中执行 花时间显示结果 - Execute in Swagger UI Taking Time to Display the Result 使用Java验证mongodb时,它花费了更多时间,并且在凭据错误的情况下抛出mongotimeoutException - While authenticating mongodb using java it is taking more time and throwing mongotimeoutException in case of wrong credential 为什么使用Java的流API收集器进行管道分组需要更多时间? - Why Pipeline grouping using Java's stream API collectors taking more time? 与在pgadmin中执行查询相比,使用JDBC执行Postgresql查询要花费更多时间 - Execution of a Postgresql query using JDBC taking much more time compared to execution of query in pgadmin 使用DI时,播放2.4在第一次请求时花费更多时间 - Play 2.4 taking much more time on first request while using DI
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM