DBQL SQLTextInfo 3577: row size or sort key size overflow

Database
Enthusiast

DBQL SQLTextInfo 3577: row size or sort key size overflow

I am getting a 3577: row size or sort key size overflow when attempting to query dbqlsqltbl.sqltextinfo in sqla (yes it is a large query).  Does anyone have any workarounds.

Thanks,

Joe

19 REPLIES
Enthusiast

Re: DBQL SQLTextInfo 3577: row size or sort key size overflow

Which version of Teradata are you on?

I faced a smiliar kind of issue some time ago on I guess V2R6, as the size of column definition that was selected was expected to grow beyond 65K row limit and thus the TD was aborting the error.

I couldn't find any specific solution at that time other than breaking up the SQL in multiple sets!

Junior Contributor

Re: DBQL SQLTextInfo 3577: row size or sort key size overflow

Hi Joe,

how do you access that column? Only in the Select list?

It's defined as a UNICODE VARCHAR(32000), which is already close to the maximum eowsize of approx. 64K.

Dieter

Enthusiast

Re: DBQL SQLTextInfo 3577: row size or sort key size overflow

Hi Dieter,

I am facing a similar issue. I have 2 tables A and B and they each have 60 columns each. When I run the below statement in Teradata Studio, I get the error 3577: row size or sort key size overflow, however when I run the same in SQL Assistant, it runs fine. Could you let me know, why Teradata Studio throws error?

Below is the query

SELECT a.*,b.*

FROM db_1.ABC a,

db_1.DEF b

WHERE a.A1 = b.A1;

Thanks

Roopalini

Junior Contributor

Re: DBQL SQLTextInfo 3577: row size or sort key size overflow

Hi Roopalini,

it's probably because Studio uses a UNICODE charset, too.

Check the definition of the tables if they include some large VarChars in LATIN.

Dieter

Enthusiast

Re: DBQL SQLTextInfo 3577: row size or sort key size overflow

Thanks Dieter!! After changing the CHARSET to ASCII from UTF8, I was able to run the SQL.  

Fan

Re: DBQL SQLTextInfo 3577: row size or sort key size overflow

In layman’s term, if you are using “Select *”, you are displaying every column in every table you are joining.  This message is saying I have reached my limit of columns to display.  What I did is start getting specific to which columns I want to display.  As I am joining new tables and want to see every column in the new table I just joined I do the following:

Example:

select

uacc.acc_num,

oacc.cm_log_owner_id,

ccomp.name,

ores.result_date,

ores.ord_value,

pat.pat_mrn_id,

pat.pat_name,

ztype.name as ENC_TYPE,

cser.prov_name as AUTHORIZING_PROVIDER,

ibm.*

Hope this helps.

Etmack

Re: DBQL SQLTextInfo 3577: row size or sort key size overflow

Hi. Can you please help me with the following query?

select oreplace(leapra.imp_impo/100 (format 'Z(7)9.99') (char(11)),'.',',') imp_impo,

oreplace(leapra.imp_fin/100 (format 'Z(7)9.99') (char(11)),'.',',') imp_fin,

         oreplace(leapra.imp_risc/100 (format 'Z(7)9.99') (char(11)),'.',',') riscatto,

         oreplace(leapra.imp_sir/100 (format 'Z(7)9.99') (char(11)),'.',',') spe_inc_rate,

         oreplace(leapra.imp_cano/100 (format 'Z(7)9.99') (char(11)),'.',',') canone from DB_FND_VIEW_TRS_PRD.dwm_an_leapra leapra;

this returns err 3577

if i omit one instruction row, it works well...

TY

Luca

Junior Contributor

Re: DBQL SQLTextInfo 3577: row size or sort key size overflow

Hi Luca,

you need to CAST the result of the oReplace to a shorter VarChar, in TD14 it's VARCHAR(8000) UNICODE.

Or you use TO_CHAR to switch comma and period:

TO_CHAR(x, '9999D99','NLS_NUMERIC_CHARACTERS = '',.''') 

Re: DBQL SQLTextInfo 3577: row size or sort key size overflow

Ty so much, Dieter!

Luca