EducationSoftwareStrategy.com
StrategyCommunity

Knowledge Base

Product

Community

Knowledge Base

TopicsBrowse ArticlesDeveloper Zone

Product

Download SoftwareProduct DocumentationSecurity Hub

Education

Tutorial VideosSolution GalleryEducation courses

Community

GuidelinesGrandmastersEvents
x_social-icon_white.svglinkedin_social-icon_white.svg
Strategy logoCommunity

© Strategy Inc. All Rights Reserved.

LegalTerms of UsePrivacy Policy
  1. Home
  2. Topics

KB441548: Poor Performance when using VARCHAR column in Snowflake


Community Admin

• Strategy


For a Snowflake database, fetch performance is adversely affected when using tables with string columns defined as VARCHAR or VARCHAR(16777216).

Actual behavior

While fetching data from a table containing VARCHAR or VARCHAR(16777216) columns there is a significant increase in the fetch time.   This will occur if a Snowflake administrator creates a table with columns defined as "VARCHAR" and does not specify a size.  This is the equivalent to setting the VARCHAR size to the maximum allowed which is 16MB (16777216).  Strategy Intelligence Server uses an ODBC Call (SQLDescribeCol) to determine the proper resources to allocate for the query results for VARCHAR columns this will lead to performance degradation.
This is due to the fact that the user allocates resources in anticipation of a very large amount of data (even if the string is only a few hundred characters max). VARCHAR(16777216) will define boundary for more size and affect the performance while fetching.

Workaround

To fix this issue, the customer has a few options:

  1. Change the VARCHAR data type in Snowflake to use a smaller size (ALTER TABLE...ALTER COLUMN).
  2. Recreate the table and with the smaller VARCHAR length and reload the data.
  3. Create a view where the VARCHAR(16777216) values are cast to a smaller size.

Comment

0 comments

Details

Knowledge Article

Published:

August 20, 2018

Last Updated:

September 15, 2025