Question

Avoid repeated ALTER SESSION statements with Snowflake

  • 7 November 2019
  • 6 replies
  • 198 views

Whenever Looker connects to our Snowflake data warehouse, it executes the following statements:


ALTER SESSION SET JDBC_TREAT_DECIMAL_AS_INT = FALSE;

ALTER SESSION SET TIMESTAMP_TYPE_MAPPING = ‘TIMESTAMP_LTZ’;

ALTER SESSION SET timezone = ‘America/Chicago’;


This takes between 1.5 and 2 seconds for each and every connection.

Such delay is noticeable and not a good user experience.

It would be great if those settings could be included in the connection string.

Alternatively, they could be grouped in a single statement


ALTER SESSION SET JDBC_TREAT_DECIMAL_AS_INT = FALSE, TIMESTAMP_TYPE_MAPPING = ‘TIMESTAMP_LTZ’, timezone = ‘America/Chicago’;


Thanks!


6 replies

This could result in displaying reports and dashboards to users 2 seconds faster. This feature should be a no-brainer!

Userlevel 3

Yes, please change the behaviour of looker combined with Snowflake. It also falsifies performance measurements and makes the visualization unnecessarily slow

Userlevel 3

any news here?

Userlevel 3

is this fixed with the pooling in the upcoming release?

Userlevel 2

We turned on connection pooling a couple of days ago, may be a little too early to tell but seems to be a noticeable step down in avg. query time. This is across all our models, roughly 30k queries/day.

Userlevel 7
Badge +1

This ALTER SESSION behavior has been resolved. We actually treated this as a bug, so moved it out of Feature Requests

Reply