Home Page for the TeradataForum
 
https:

Archives of the TeradataForum

Message Posted: Thu, 07 Aug 2008 @ 09:21:05 GMT


     
  <Prev Next>   <<First <Prev
Next>
Last>>
 


Subj:   Re: SQL request exceeds maximum allowed length of 1 MB
 
From:   Victor Sokovin

  Teradata seems to have 2 limits:  


  1. SQL which will be send from any kind of Application with a limit of 64k (at least till 6.2)  


  2. SQL which will be generated by the ODBC Driver with a limit of 1MB  


  This means even though your SQL is not exceeding the limit of 64k, OBDBC can generate such a huge SQL that your limit will exceed anyway.  


Joerg, let's not get confused about this again!

For those who did not follow the previous thread on SQL request size limit, here is the reference:

www.teradataforum.com/teradata/20080305_092824.htm


My understanding is:

1. Teradata has the limit of 1 MB on SQL request text (the size in bytes of the SQL statement; not the sum of letters used to specify columns but all the characters together whether they are in columns, table names or predicates; if Unicode strings are used, they will be "expensive");

2. Teradata has the limit of 2 MB on the "expanded" SQL requests for things like views and macros.

3. In theory, these two limits (and no lower limits) should apply regardless of the method we use to send requests to Teradata: native via BTEQ, ODBC or JDBC.

4. In reality, things can get messy as Joerg's thread has shown us: large SQL statements may take a long time to get parsed by ODBC drivers. When we try to disable the ODBC parsing unexpected lower limits on SQL size may all of a sudden be applied by Teradata. They may be caused by the reasons explained in the documentation (and mentioned in the thread above) or simply by bugs.


  In addition to the view disabled parsing and preparation on the ODBC Driver, this could also help you to shrink down the SQL at least on the ODBC side.  


Is this really the case now? Have they fixed the bug?


Victor



     
  <Prev Next>   <<First <Prev
Next>
Last>>
 
 
 
 
 
 
 
 
 
  
  Top Home Privacy Feedback  
 
 
Copyright for the TeradataForum (TDATA-L), Manta BlueSky    
Copyright 2016 - All Rights Reserved    
Last Modified: 28 Jun 2020