Redshift column VARCHAR(MAX) question

0

A customer is looking at creating a redshift table with a large varchar(65535) column (although only a tiny percentage of data will be large), but our best practice suggests that use the smallest possible column size (due to potential memory waste).

They’d like to clarify:

  1. Does that mean having a varchar column with large max size will only affect performance if we store a lot of large strings in the column?
  2. Would there be any problems if say 90% of the data is only 20 bytes?

I found a support article mentions that trailing blanks can occupy the full length in memory during query processing, but still not clear enough to answer the above questions.

질문됨 4년 전7972회 조회
1개 답변
0
수락된 답변

The impact of the wide columns is mainly when you query the data. I.e. if the user queries others columns in the table, the wide column will not impact the query performance. If the column is queried often, the better approach is to parse out the pertinent piece(s) of information and load into dedicated & right-sized columns for most reporting purposes. You can leave the raw data in the current column but advise users to avoid accessing those columns.

profile pictureAWS
전문가
Rajiv_G
답변함 4년 전

로그인하지 않았습니다. 로그인해야 답변을 게시할 수 있습니다.

좋은 답변은 질문에 명확하게 답하고 건설적인 피드백을 제공하며 질문자의 전문적인 성장을 장려합니다.

질문 답변하기에 대한 가이드라인

관련 콘텐츠